@langgraph-js/ui 2.0.0 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/index-B2mFqDrs.js +268 -0
- package/dist/assets/index-DzEw-fFg.css +1 -0
- package/dist/index.html +2 -2
- package/package.json +6 -1
- package/src/chat/Chat.tsx +19 -10
- package/src/chat/components/ErrorBoundary.tsx +29 -0
- package/src/chat/components/JSONViewer.tsx +18 -0
- package/src/chat/components/MessageBox.tsx +144 -19
- package/src/chat/store/index.ts +1 -6
- package/src/chat/tools/create_artifacts.tsx +3 -3
- package/src/chat/tools/index.ts +4 -3
- package/src/chat/tools/show_form.tsx +517 -0
- package/src/graph/index.tsx +1 -1
- package/src/index.ts +1 -1
- package/test/App.tsx +1 -1
- package/dist/assets/index-DqBQMHgz.css +0 -1
- package/dist/assets/index-g7kEDOdp.js +0 -248
- package/src/chat/tools/ask_user_for_approve.tsx +0 -80
- package/src/chat/tools/update_plan.tsx +0 -75
- package/src/chat/tools/web_search_tool.tsx +0 -89
|
@@ -0,0 +1,268 @@
|
|
|
1
|
+
var iq=Object.defineProperty;var yT=e=>{throw TypeError(e)};var aq=(e,t,n)=>t in e?iq(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var sq=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var De=(e,t,n)=>aq(e,typeof t!="symbol"?t+"":t,n),bT=(e,t,n)=>t.has(e)||yT("Cannot "+n);var it=(e,t,n)=>(bT(e,t,"read from private field"),n?n.call(e):t.get(e)),ya=(e,t,n)=>t.has(e)?yT("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),wo=(e,t,n,r)=>(bT(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n);var i0e=sq((rr,ir)=>{(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const a of i)if(a.type==="childList")for(const o of a.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(i){const a={};return i.integrity&&(a.integrity=i.integrity),i.referrerPolicy&&(a.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?a.credentials="include":i.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function r(i){if(i.ep)return;i.ep=!0;const a=n(i);fetch(i.href,a)}})();var fd=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function zn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ty={exports:{}},bu={};/**
|
|
2
|
+
* @license React
|
|
3
|
+
* react-jsx-runtime.production.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/var vT;function oq(){if(vT)return bu;vT=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,i,a){var o=null;if(a!==void 0&&(o=""+a),i.key!==void 0&&(o=""+i.key),"key"in i){a={};for(var l in i)l!=="key"&&(a[l]=i[l])}else a=i;return i=a.ref,{$$typeof:e,type:r,key:o,ref:i!==void 0?i:null,props:a}}return bu.Fragment=t,bu.jsx=n,bu.jsxs=n,bu}var _T;function lq(){return _T||(_T=1,Ty.exports=oq()),Ty.exports}var N=lq(),Cy={exports:{}},vu={},Oy={exports:{}},Ny={};/**
|
|
10
|
+
* @license React
|
|
11
|
+
* scheduler.production.js
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
14
|
+
*
|
|
15
|
+
* This source code is licensed under the MIT license found in the
|
|
16
|
+
* LICENSE file in the root directory of this source tree.
|
|
17
|
+
*/var xT;function uq(){return xT||(xT=1,function(e){function t(B,G){var K=B.length;B.push(G);e:for(;0<K;){var Q=K-1>>>1,R=B[Q];if(0<i(R,G))B[Q]=G,B[K]=R,K=Q;else break e}}function n(B){return B.length===0?null:B[0]}function r(B){if(B.length===0)return null;var G=B[0],K=B.pop();if(K!==G){B[0]=K;e:for(var Q=0,R=B.length,V=R>>>1;Q<V;){var X=2*(Q+1)-1,j=B[X],I=X+1,U=B[I];if(0>i(j,K))I<R&&0>i(U,j)?(B[Q]=U,B[I]=K,Q=I):(B[Q]=j,B[X]=K,Q=X);else if(I<R&&0>i(U,K))B[Q]=U,B[I]=K,Q=I;else break e}}return G}function i(B,G){var K=B.sortIndex-G.sortIndex;return K!==0?K:B.id-G.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,l=o.now();e.unstable_now=function(){return o.now()-l}}var c=[],f=[],d=1,h=null,m=3,g=!1,v=!1,w=!1,b=!1,_=typeof setTimeout=="function"?setTimeout:null,S=typeof clearTimeout=="function"?clearTimeout:null,x=typeof setImmediate<"u"?setImmediate:null;function A(B){for(var G=n(f);G!==null;){if(G.callback===null)r(f);else if(G.startTime<=B)r(f),G.sortIndex=G.expirationTime,t(c,G);else break;G=n(f)}}function k(B){if(w=!1,A(B),!v)if(n(c)!==null)v=!0,T||(T=!0,P());else{var G=n(f);G!==null&&H(k,G.startTime-B)}}var T=!1,O=-1,$=5,L=-1;function M(){return b?!0:!(e.unstable_now()-L<$)}function z(){if(b=!1,T){var B=e.unstable_now();L=B;var G=!0;try{e:{v=!1,w&&(w=!1,S(O),O=-1),g=!0;var K=m;try{t:{for(A(B),h=n(c);h!==null&&!(h.expirationTime>B&&M());){var Q=h.callback;if(typeof Q=="function"){h.callback=null,m=h.priorityLevel;var R=Q(h.expirationTime<=B);if(B=e.unstable_now(),typeof R=="function"){h.callback=R,A(B),G=!0;break t}h===n(c)&&r(c),A(B)}else r(c);h=n(c)}if(h!==null)G=!0;else{var V=n(f);V!==null&&H(k,V.startTime-B),G=!1}}break e}finally{h=null,m=K,g=!1}G=void 0}}finally{G?P():T=!1}}}var P;if(typeof x=="function")P=function(){x(z)};else if(typeof MessageChannel<"u"){var q=new MessageChannel,D=q.port2;q.port1.onmessage=z,P=function(){D.postMessage(null)}}else P=function(){_(z,0)};function H(B,G){O=_(function(){B(e.unstable_now())},G)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(B){B.callback=null},e.unstable_forceFrameRate=function(B){0>B||125<B?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):$=0<B?Math.floor(1e3/B):5},e.unstable_getCurrentPriorityLevel=function(){return m},e.unstable_next=function(B){switch(m){case 1:case 2:case 3:var G=3;break;default:G=m}var K=m;m=G;try{return B()}finally{m=K}},e.unstable_requestPaint=function(){b=!0},e.unstable_runWithPriority=function(B,G){switch(B){case 1:case 2:case 3:case 4:case 5:break;default:B=3}var K=m;m=B;try{return G()}finally{m=K}},e.unstable_scheduleCallback=function(B,G,K){var Q=e.unstable_now();switch(typeof K=="object"&&K!==null?(K=K.delay,K=typeof K=="number"&&0<K?Q+K:Q):K=Q,B){case 1:var R=-1;break;case 2:R=250;break;case 5:R=1073741823;break;case 4:R=1e4;break;default:R=5e3}return R=K+R,B={id:d++,callback:G,priorityLevel:B,startTime:K,expirationTime:R,sortIndex:-1},K>Q?(B.sortIndex=K,t(f,B),n(c)===null&&B===n(f)&&(w?(S(O),O=-1):w=!0,H(k,K-Q))):(B.sortIndex=R,t(c,B),v||g||(v=!0,T||(T=!0,P()))),B},e.unstable_shouldYield=M,e.unstable_wrapCallback=function(B){var G=m;return function(){var K=m;m=G;try{return B.apply(this,arguments)}finally{m=K}}}}(Ny)),Ny}var wT;function cq(){return wT||(wT=1,Oy.exports=uq()),Oy.exports}var Ry={exports:{}},Ye={};/**
|
|
18
|
+
* @license React
|
|
19
|
+
* react.production.js
|
|
20
|
+
*
|
|
21
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
22
|
+
*
|
|
23
|
+
* This source code is licensed under the MIT license found in the
|
|
24
|
+
* LICENSE file in the root directory of this source tree.
|
|
25
|
+
*/var ST;function fq(){if(ST)return Ye;ST=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),a=Symbol.for("react.consumer"),o=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),h=Symbol.iterator;function m(R){return R===null||typeof R!="object"?null:(R=h&&R[h]||R["@@iterator"],typeof R=="function"?R:null)}var g={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},v=Object.assign,w={};function b(R,V,X){this.props=R,this.context=V,this.refs=w,this.updater=X||g}b.prototype.isReactComponent={},b.prototype.setState=function(R,V){if(typeof R!="object"&&typeof R!="function"&&R!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,R,V,"setState")},b.prototype.forceUpdate=function(R){this.updater.enqueueForceUpdate(this,R,"forceUpdate")};function _(){}_.prototype=b.prototype;function S(R,V,X){this.props=R,this.context=V,this.refs=w,this.updater=X||g}var x=S.prototype=new _;x.constructor=S,v(x,b.prototype),x.isPureReactComponent=!0;var A=Array.isArray,k={H:null,A:null,T:null,S:null,V:null},T=Object.prototype.hasOwnProperty;function O(R,V,X,j,I,U){return X=U.ref,{$$typeof:e,type:R,key:V,ref:X!==void 0?X:null,props:U}}function $(R,V){return O(R.type,V,void 0,void 0,void 0,R.props)}function L(R){return typeof R=="object"&&R!==null&&R.$$typeof===e}function M(R){var V={"=":"=0",":":"=2"};return"$"+R.replace(/[=:]/g,function(X){return V[X]})}var z=/\/+/g;function P(R,V){return typeof R=="object"&&R!==null&&R.key!=null?M(""+R.key):V.toString(36)}function q(){}function D(R){switch(R.status){case"fulfilled":return R.value;case"rejected":throw R.reason;default:switch(typeof R.status=="string"?R.then(q,q):(R.status="pending",R.then(function(V){R.status==="pending"&&(R.status="fulfilled",R.value=V)},function(V){R.status==="pending"&&(R.status="rejected",R.reason=V)})),R.status){case"fulfilled":return R.value;case"rejected":throw R.reason}}throw R}function H(R,V,X,j,I){var U=typeof R;(U==="undefined"||U==="boolean")&&(R=null);var Y=!1;if(R===null)Y=!0;else switch(U){case"bigint":case"string":case"number":Y=!0;break;case"object":switch(R.$$typeof){case e:case t:Y=!0;break;case d:return Y=R._init,H(Y(R._payload),V,X,j,I)}}if(Y)return I=I(R),Y=j===""?"."+P(R,0):j,A(I)?(X="",Y!=null&&(X=Y.replace(z,"$&/")+"/"),H(I,V,X,"",function(re){return re})):I!=null&&(L(I)&&(I=$(I,X+(I.key==null||R&&R.key===I.key?"":(""+I.key).replace(z,"$&/")+"/")+Y)),V.push(I)),1;Y=0;var ne=j===""?".":j+":";if(A(R))for(var ae=0;ae<R.length;ae++)j=R[ae],U=ne+P(j,ae),Y+=H(j,V,X,U,I);else if(ae=m(R),typeof ae=="function")for(R=ae.call(R),ae=0;!(j=R.next()).done;)j=j.value,U=ne+P(j,ae++),Y+=H(j,V,X,U,I);else if(U==="object"){if(typeof R.then=="function")return H(D(R),V,X,j,I);throw V=String(R),Error("Objects are not valid as a React child (found: "+(V==="[object Object]"?"object with keys {"+Object.keys(R).join(", ")+"}":V)+"). If you meant to render a collection of children, use an array instead.")}return Y}function B(R,V,X){if(R==null)return R;var j=[],I=0;return H(R,j,"","",function(U){return V.call(X,U,I++)}),j}function G(R){if(R._status===-1){var V=R._result;V=V(),V.then(function(X){(R._status===0||R._status===-1)&&(R._status=1,R._result=X)},function(X){(R._status===0||R._status===-1)&&(R._status=2,R._result=X)}),R._status===-1&&(R._status=0,R._result=V)}if(R._status===1)return R._result.default;throw R._result}var K=typeof reportError=="function"?reportError:function(R){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var V=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof R=="object"&&R!==null&&typeof R.message=="string"?String(R.message):String(R),error:R});if(!window.dispatchEvent(V))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",R);return}console.error(R)};function Q(){}return Ye.Children={map:B,forEach:function(R,V,X){B(R,function(){V.apply(this,arguments)},X)},count:function(R){var V=0;return B(R,function(){V++}),V},toArray:function(R){return B(R,function(V){return V})||[]},only:function(R){if(!L(R))throw Error("React.Children.only expected to receive a single React element child.");return R}},Ye.Component=b,Ye.Fragment=n,Ye.Profiler=i,Ye.PureComponent=S,Ye.StrictMode=r,Ye.Suspense=c,Ye.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=k,Ye.__COMPILER_RUNTIME={__proto__:null,c:function(R){return k.H.useMemoCache(R)}},Ye.cache=function(R){return function(){return R.apply(null,arguments)}},Ye.cloneElement=function(R,V,X){if(R==null)throw Error("The argument must be a React element, but you passed "+R+".");var j=v({},R.props),I=R.key,U=void 0;if(V!=null)for(Y in V.ref!==void 0&&(U=void 0),V.key!==void 0&&(I=""+V.key),V)!T.call(V,Y)||Y==="key"||Y==="__self"||Y==="__source"||Y==="ref"&&V.ref===void 0||(j[Y]=V[Y]);var Y=arguments.length-2;if(Y===1)j.children=X;else if(1<Y){for(var ne=Array(Y),ae=0;ae<Y;ae++)ne[ae]=arguments[ae+2];j.children=ne}return O(R.type,I,void 0,void 0,U,j)},Ye.createContext=function(R){return R={$$typeof:o,_currentValue:R,_currentValue2:R,_threadCount:0,Provider:null,Consumer:null},R.Provider=R,R.Consumer={$$typeof:a,_context:R},R},Ye.createElement=function(R,V,X){var j,I={},U=null;if(V!=null)for(j in V.key!==void 0&&(U=""+V.key),V)T.call(V,j)&&j!=="key"&&j!=="__self"&&j!=="__source"&&(I[j]=V[j]);var Y=arguments.length-2;if(Y===1)I.children=X;else if(1<Y){for(var ne=Array(Y),ae=0;ae<Y;ae++)ne[ae]=arguments[ae+2];I.children=ne}if(R&&R.defaultProps)for(j in Y=R.defaultProps,Y)I[j]===void 0&&(I[j]=Y[j]);return O(R,U,void 0,void 0,null,I)},Ye.createRef=function(){return{current:null}},Ye.forwardRef=function(R){return{$$typeof:l,render:R}},Ye.isValidElement=L,Ye.lazy=function(R){return{$$typeof:d,_payload:{_status:-1,_result:R},_init:G}},Ye.memo=function(R,V){return{$$typeof:f,type:R,compare:V===void 0?null:V}},Ye.startTransition=function(R){var V=k.T,X={};k.T=X;try{var j=R(),I=k.S;I!==null&&I(X,j),typeof j=="object"&&j!==null&&typeof j.then=="function"&&j.then(Q,K)}catch(U){K(U)}finally{k.T=V}},Ye.unstable_useCacheRefresh=function(){return k.H.useCacheRefresh()},Ye.use=function(R){return k.H.use(R)},Ye.useActionState=function(R,V,X){return k.H.useActionState(R,V,X)},Ye.useCallback=function(R,V){return k.H.useCallback(R,V)},Ye.useContext=function(R){return k.H.useContext(R)},Ye.useDebugValue=function(){},Ye.useDeferredValue=function(R,V){return k.H.useDeferredValue(R,V)},Ye.useEffect=function(R,V,X){var j=k.H;if(typeof X=="function")throw Error("useEffect CRUD overload is not enabled in this build of React.");return j.useEffect(R,V)},Ye.useId=function(){return k.H.useId()},Ye.useImperativeHandle=function(R,V,X){return k.H.useImperativeHandle(R,V,X)},Ye.useInsertionEffect=function(R,V){return k.H.useInsertionEffect(R,V)},Ye.useLayoutEffect=function(R,V){return k.H.useLayoutEffect(R,V)},Ye.useMemo=function(R,V){return k.H.useMemo(R,V)},Ye.useOptimistic=function(R,V){return k.H.useOptimistic(R,V)},Ye.useReducer=function(R,V,X){return k.H.useReducer(R,V,X)},Ye.useRef=function(R){return k.H.useRef(R)},Ye.useState=function(R){return k.H.useState(R)},Ye.useSyncExternalStore=function(R,V,X){return k.H.useSyncExternalStore(R,V,X)},Ye.useTransition=function(){return k.H.useTransition()},Ye.version="19.1.0",Ye}var ET;function Sc(){return ET||(ET=1,Ry.exports=fq()),Ry.exports}var jy={exports:{}},vn={};/**
|
|
26
|
+
* @license React
|
|
27
|
+
* react-dom.production.js
|
|
28
|
+
*
|
|
29
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
30
|
+
*
|
|
31
|
+
* This source code is licensed under the MIT license found in the
|
|
32
|
+
* LICENSE file in the root directory of this source tree.
|
|
33
|
+
*/var kT;function dq(){if(kT)return vn;kT=1;var e=Sc();function t(c){var f="https://react.dev/errors/"+c;if(1<arguments.length){f+="?args[]="+encodeURIComponent(arguments[1]);for(var d=2;d<arguments.length;d++)f+="&args[]="+encodeURIComponent(arguments[d])}return"Minified React error #"+c+"; visit "+f+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var r={d:{f:n,r:function(){throw Error(t(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},i=Symbol.for("react.portal");function a(c,f,d){var h=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:i,key:h==null?null:""+h,children:c,containerInfo:f,implementation:d}}var o=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function l(c,f){if(c==="font")return"";if(typeof f=="string")return f==="use-credentials"?f:""}return vn.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,vn.createPortal=function(c,f){var d=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!f||f.nodeType!==1&&f.nodeType!==9&&f.nodeType!==11)throw Error(t(299));return a(c,f,null,d)},vn.flushSync=function(c){var f=o.T,d=r.p;try{if(o.T=null,r.p=2,c)return c()}finally{o.T=f,r.p=d,r.d.f()}},vn.preconnect=function(c,f){typeof c=="string"&&(f?(f=f.crossOrigin,f=typeof f=="string"?f==="use-credentials"?f:"":void 0):f=null,r.d.C(c,f))},vn.prefetchDNS=function(c){typeof c=="string"&&r.d.D(c)},vn.preinit=function(c,f){if(typeof c=="string"&&f&&typeof f.as=="string"){var d=f.as,h=l(d,f.crossOrigin),m=typeof f.integrity=="string"?f.integrity:void 0,g=typeof f.fetchPriority=="string"?f.fetchPriority:void 0;d==="style"?r.d.S(c,typeof f.precedence=="string"?f.precedence:void 0,{crossOrigin:h,integrity:m,fetchPriority:g}):d==="script"&&r.d.X(c,{crossOrigin:h,integrity:m,fetchPriority:g,nonce:typeof f.nonce=="string"?f.nonce:void 0})}},vn.preinitModule=function(c,f){if(typeof c=="string")if(typeof f=="object"&&f!==null){if(f.as==null||f.as==="script"){var d=l(f.as,f.crossOrigin);r.d.M(c,{crossOrigin:d,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0})}}else f==null&&r.d.M(c)},vn.preload=function(c,f){if(typeof c=="string"&&typeof f=="object"&&f!==null&&typeof f.as=="string"){var d=f.as,h=l(d,f.crossOrigin);r.d.L(c,d,{crossOrigin:h,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0,type:typeof f.type=="string"?f.type:void 0,fetchPriority:typeof f.fetchPriority=="string"?f.fetchPriority:void 0,referrerPolicy:typeof f.referrerPolicy=="string"?f.referrerPolicy:void 0,imageSrcSet:typeof f.imageSrcSet=="string"?f.imageSrcSet:void 0,imageSizes:typeof f.imageSizes=="string"?f.imageSizes:void 0,media:typeof f.media=="string"?f.media:void 0})}},vn.preloadModule=function(c,f){if(typeof c=="string")if(f){var d=l(f.as,f.crossOrigin);r.d.m(c,{as:typeof f.as=="string"&&f.as!=="script"?f.as:void 0,crossOrigin:d,integrity:typeof f.integrity=="string"?f.integrity:void 0})}else r.d.m(c)},vn.requestFormReset=function(c){r.d.r(c)},vn.unstable_batchedUpdates=function(c,f){return c(f)},vn.useFormState=function(c,f,d){return o.H.useFormState(c,f,d)},vn.useFormStatus=function(){return o.H.useHostTransitionStatus()},vn.version="19.1.0",vn}var AT;function ZI(){if(AT)return jy.exports;AT=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),jy.exports=dq(),jy.exports}/**
|
|
34
|
+
* @license React
|
|
35
|
+
* react-dom-client.production.js
|
|
36
|
+
*
|
|
37
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
38
|
+
*
|
|
39
|
+
* This source code is licensed under the MIT license found in the
|
|
40
|
+
* LICENSE file in the root directory of this source tree.
|
|
41
|
+
*/var TT;function hq(){if(TT)return vu;TT=1;var e=cq(),t=Sc(),n=ZI();function r(s){var u="https://react.dev/errors/"+s;if(1<arguments.length){u+="?args[]="+encodeURIComponent(arguments[1]);for(var p=2;p<arguments.length;p++)u+="&args[]="+encodeURIComponent(arguments[p])}return"Minified React error #"+s+"; visit "+u+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(s){return!(!s||s.nodeType!==1&&s.nodeType!==9&&s.nodeType!==11)}function a(s){var u=s,p=s;if(s.alternate)for(;u.return;)u=u.return;else{s=u;do u=s,(u.flags&4098)!==0&&(p=u.return),s=u.return;while(s)}return u.tag===3?p:null}function o(s){if(s.tag===13){var u=s.memoizedState;if(u===null&&(s=s.alternate,s!==null&&(u=s.memoizedState)),u!==null)return u.dehydrated}return null}function l(s){if(a(s)!==s)throw Error(r(188))}function c(s){var u=s.alternate;if(!u){if(u=a(s),u===null)throw Error(r(188));return u!==s?null:s}for(var p=s,y=u;;){var E=p.return;if(E===null)break;var C=E.alternate;if(C===null){if(y=E.return,y!==null){p=y;continue}break}if(E.child===C.child){for(C=E.child;C;){if(C===p)return l(E),s;if(C===y)return l(E),u;C=C.sibling}throw Error(r(188))}if(p.return!==y.return)p=E,y=C;else{for(var F=!1,Z=E.child;Z;){if(Z===p){F=!0,p=E,y=C;break}if(Z===y){F=!0,y=E,p=C;break}Z=Z.sibling}if(!F){for(Z=C.child;Z;){if(Z===p){F=!0,p=C,y=E;break}if(Z===y){F=!0,y=C,p=E;break}Z=Z.sibling}if(!F)throw Error(r(189))}}if(p.alternate!==y)throw Error(r(190))}if(p.tag!==3)throw Error(r(188));return p.stateNode.current===p?s:u}function f(s){var u=s.tag;if(u===5||u===26||u===27||u===6)return s;for(s=s.child;s!==null;){if(u=f(s),u!==null)return u;s=s.sibling}return null}var d=Object.assign,h=Symbol.for("react.element"),m=Symbol.for("react.transitional.element"),g=Symbol.for("react.portal"),v=Symbol.for("react.fragment"),w=Symbol.for("react.strict_mode"),b=Symbol.for("react.profiler"),_=Symbol.for("react.provider"),S=Symbol.for("react.consumer"),x=Symbol.for("react.context"),A=Symbol.for("react.forward_ref"),k=Symbol.for("react.suspense"),T=Symbol.for("react.suspense_list"),O=Symbol.for("react.memo"),$=Symbol.for("react.lazy"),L=Symbol.for("react.activity"),M=Symbol.for("react.memo_cache_sentinel"),z=Symbol.iterator;function P(s){return s===null||typeof s!="object"?null:(s=z&&s[z]||s["@@iterator"],typeof s=="function"?s:null)}var q=Symbol.for("react.client.reference");function D(s){if(s==null)return null;if(typeof s=="function")return s.$$typeof===q?null:s.displayName||s.name||null;if(typeof s=="string")return s;switch(s){case v:return"Fragment";case b:return"Profiler";case w:return"StrictMode";case k:return"Suspense";case T:return"SuspenseList";case L:return"Activity"}if(typeof s=="object")switch(s.$$typeof){case g:return"Portal";case x:return(s.displayName||"Context")+".Provider";case S:return(s._context.displayName||"Context")+".Consumer";case A:var u=s.render;return s=s.displayName,s||(s=u.displayName||u.name||"",s=s!==""?"ForwardRef("+s+")":"ForwardRef"),s;case O:return u=s.displayName||null,u!==null?u:D(s.type)||"Memo";case $:u=s._payload,s=s._init;try{return D(s(u))}catch{}}return null}var H=Array.isArray,B=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,G=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,K={pending:!1,data:null,method:null,action:null},Q=[],R=-1;function V(s){return{current:s}}function X(s){0>R||(s.current=Q[R],Q[R]=null,R--)}function j(s,u){R++,Q[R]=s.current,s.current=u}var I=V(null),U=V(null),Y=V(null),ne=V(null);function ae(s,u){switch(j(Y,u),j(U,s),j(I,null),u.nodeType){case 9:case 11:s=(s=u.documentElement)&&(s=s.namespaceURI)?H2(s):0;break;default:if(s=u.tagName,u=u.namespaceURI)u=H2(u),s=G2(u,s);else switch(s){case"svg":s=1;break;case"math":s=2;break;default:s=0}}X(I),j(I,s)}function re(){X(I),X(U),X(Y)}function le(s){s.memoizedState!==null&&j(ne,s);var u=I.current,p=G2(u,s.type);u!==p&&(j(U,s),j(I,p))}function W(s){U.current===s&&(X(I),X(U)),ne.current===s&&(X(ne),hu._currentValue=K)}var J=Object.prototype.hasOwnProperty,se=e.unstable_scheduleCallback,fe=e.unstable_cancelCallback,me=e.unstable_shouldYield,xe=e.unstable_requestPaint,we=e.unstable_now,Ve=e.unstable_getCurrentPriorityLevel,qe=e.unstable_ImmediatePriority,We=e.unstable_UserBlockingPriority,He=e.unstable_NormalPriority,$e=e.unstable_LowPriority,Be=e.unstable_IdlePriority,Ot=e.log,kt=e.unstable_setDisableYieldValue,pe=null,_e=null;function Te(s){if(typeof Ot=="function"&&kt(s),_e&&typeof _e.setStrictMode=="function")try{_e.setStrictMode(pe,s)}catch{}}var je=Math.clz32?Math.clz32:Cn,rt=Math.log,cn=Math.LN2;function Cn(s){return s>>>=0,s===0?32:31-(rt(s)/cn|0)|0}var $t=256,Gt=4194304;function wn(s){var u=s&42;if(u!==0)return u;switch(s&-s){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return s&4194048;case 4194304:case 8388608:case 16777216:case 33554432:return s&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return s}}function Yt(s,u,p){var y=s.pendingLanes;if(y===0)return 0;var E=0,C=s.suspendedLanes,F=s.pingedLanes;s=s.warmLanes;var Z=y&134217727;return Z!==0?(y=Z&~C,y!==0?E=wn(y):(F&=Z,F!==0?E=wn(F):p||(p=Z&~s,p!==0&&(E=wn(p))))):(Z=y&~C,Z!==0?E=wn(Z):F!==0?E=wn(F):p||(p=y&~s,p!==0&&(E=wn(p)))),E===0?0:u!==0&&u!==E&&(u&C)===0&&(C=E&-E,p=u&-u,C>=p||C===32&&(p&4194048)!==0)?u:E}function On(s,u){return(s.pendingLanes&~(s.suspendedLanes&~s.pingedLanes)&u)===0}function Bn(s,u){switch(s){case 1:case 2:case 4:case 8:case 64:return u+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return u+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Hc(){var s=$t;return $t<<=1,($t&4194048)===0&&($t=256),s}function Gc(){var s=Gt;return Gt<<=1,(Gt&62914560)===0&&(Gt=4194304),s}function gl(s){for(var u=[],p=0;31>p;p++)u.push(s);return u}function za(s,u){s.pendingLanes|=u,u!==268435456&&(s.suspendedLanes=0,s.pingedLanes=0,s.warmLanes=0)}function bm(s,u,p,y,E,C){var F=s.pendingLanes;s.pendingLanes=p,s.suspendedLanes=0,s.pingedLanes=0,s.warmLanes=0,s.expiredLanes&=p,s.entangledLanes&=p,s.errorRecoveryDisabledLanes&=p,s.shellSuspendCounter=0;var Z=s.entanglements,ee=s.expirationTimes,ce=s.hiddenUpdates;for(p=F&~p;0<p;){var ge=31-je(p),ve=1<<ge;Z[ge]=0,ee[ge]=-1;var de=ce[ge];if(de!==null)for(ce[ge]=null,ge=0;ge<de.length;ge++){var he=de[ge];he!==null&&(he.lane&=-536870913)}p&=~ve}y!==0&&yl(s,y,0),C!==0&&E===0&&s.tag!==0&&(s.suspendedLanes|=C&~(F&~u))}function yl(s,u,p){s.pendingLanes|=u,s.suspendedLanes&=~u;var y=31-je(u);s.entangledLanes|=u,s.entanglements[y]=s.entanglements[y]|1073741824|p&4194090}function Yc(s,u){var p=s.entangledLanes|=u;for(s=s.entanglements;p;){var y=31-je(p),E=1<<y;E&u|s[y]&u&&(s[y]|=u),p&=~E}}function bl(s){switch(s){case 2:s=1;break;case 8:s=4;break;case 32:s=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:s=128;break;case 268435456:s=134217728;break;default:s=0}return s}function vl(s){return s&=-s,2<s?8<s?(s&134217727)!==0?32:268435456:8:2}function Zc(){var s=G.p;return s!==0?s:(s=window.event,s===void 0?32:fT(s.type))}function vm(s,u){var p=G.p;try{return G.p=s,u()}finally{G.p=p}}var zr=Math.random().toString(36).slice(2),sn="__reactFiber$"+zr,yn="__reactProps$"+zr,Ui="__reactContainer$"+zr,_l="__reactEvents$"+zr,_m="__reactListeners$"+zr,xm="__reactHandles$"+zr,Kc="__reactResources$"+zr,qa="__reactMarker$"+zr;function xl(s){delete s[sn],delete s[yn],delete s[_l],delete s[_m],delete s[xm]}function si(s){var u=s[sn];if(u)return u;for(var p=s.parentNode;p;){if(u=p[Ui]||p[sn]){if(p=u.alternate,u.child!==null||p!==null&&p.child!==null)for(s=X2(s);s!==null;){if(p=s[sn])return p;s=X2(s)}return u}s=p,p=s.parentNode}return null}function oi(s){if(s=s[sn]||s[Ui]){var u=s.tag;if(u===5||u===6||u===13||u===26||u===27||u===3)return s}return null}function Vi(s){var u=s.tag;if(u===5||u===26||u===27||u===6)return s.stateNode;throw Error(r(33))}function Hi(s){var u=s[Kc];return u||(u=s[Kc]={hoistableStyles:new Map,hoistableScripts:new Map}),u}function Zt(s){s[qa]=!0}var Xc=new Set,Wc={};function li(s,u){Gi(s,u),Gi(s+"Capture",u)}function Gi(s,u){for(Wc[s]=u,s=0;s<u.length;s++)Xc.add(u[s])}var Qc=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),Jc={},ef={};function wm(s){return J.call(ef,s)?!0:J.call(Jc,s)?!1:Qc.test(s)?ef[s]=!0:(Jc[s]=!0,!1)}function Ps(s,u,p){if(wm(u))if(p===null)s.removeAttribute(u);else{switch(typeof p){case"undefined":case"function":case"symbol":s.removeAttribute(u);return;case"boolean":var y=u.toLowerCase().slice(0,5);if(y!=="data-"&&y!=="aria-"){s.removeAttribute(u);return}}s.setAttribute(u,""+p)}}function Ls(s,u,p){if(p===null)s.removeAttribute(u);else{switch(typeof p){case"undefined":case"function":case"symbol":case"boolean":s.removeAttribute(u);return}s.setAttribute(u,""+p)}}function xr(s,u,p,y){if(y===null)s.removeAttribute(p);else{switch(typeof y){case"undefined":case"function":case"symbol":case"boolean":s.removeAttribute(p);return}s.setAttributeNS(u,p,""+y)}}var wl,Sl;function Yi(s){if(wl===void 0)try{throw Error()}catch(p){var u=p.stack.trim().match(/\n( *(at )?)/);wl=u&&u[1]||"",Sl=-1<p.stack.indexOf(`
|
|
42
|
+
at`)?" (<anonymous>)":-1<p.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
+
`+wl+s+Sl}var El=!1;function kl(s,u){if(!s||El)return"";El=!0;var p=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var y={DetermineComponentFrameRoot:function(){try{if(u){var ve=function(){throw Error()};if(Object.defineProperty(ve.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ve,[])}catch(he){var de=he}Reflect.construct(s,[],ve)}else{try{ve.call()}catch(he){de=he}s.call(ve.prototype)}}else{try{throw Error()}catch(he){de=he}(ve=s())&&typeof ve.catch=="function"&&ve.catch(function(){})}}catch(he){if(he&&de&&typeof he.stack=="string")return[he.stack,de.stack]}return[null,null]}};y.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var E=Object.getOwnPropertyDescriptor(y.DetermineComponentFrameRoot,"name");E&&E.configurable&&Object.defineProperty(y.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var C=y.DetermineComponentFrameRoot(),F=C[0],Z=C[1];if(F&&Z){var ee=F.split(`
|
|
44
|
+
`),ce=Z.split(`
|
|
45
|
+
`);for(E=y=0;y<ee.length&&!ee[y].includes("DetermineComponentFrameRoot");)y++;for(;E<ce.length&&!ce[E].includes("DetermineComponentFrameRoot");)E++;if(y===ee.length||E===ce.length)for(y=ee.length-1,E=ce.length-1;1<=y&&0<=E&&ee[y]!==ce[E];)E--;for(;1<=y&&0<=E;y--,E--)if(ee[y]!==ce[E]){if(y!==1||E!==1)do if(y--,E--,0>E||ee[y]!==ce[E]){var ge=`
|
|
46
|
+
`+ee[y].replace(" at new "," at ");return s.displayName&&ge.includes("<anonymous>")&&(ge=ge.replace("<anonymous>",s.displayName)),ge}while(1<=y&&0<=E);break}}}finally{El=!1,Error.prepareStackTrace=p}return(p=s?s.displayName||s.name:"")?Yi(p):""}function Sm(s){switch(s.tag){case 26:case 27:case 5:return Yi(s.type);case 16:return Yi("Lazy");case 13:return Yi("Suspense");case 19:return Yi("SuspenseList");case 0:case 15:return kl(s.type,!1);case 11:return kl(s.type.render,!1);case 1:return kl(s.type,!0);case 31:return Yi("Activity");default:return""}}function tf(s){try{var u="";do u+=Sm(s),s=s.return;while(s);return u}catch(p){return`
|
|
47
|
+
Error generating stack: `+p.message+`
|
|
48
|
+
`+p.stack}}function Nn(s){switch(typeof s){case"bigint":case"boolean":case"number":case"string":case"undefined":return s;case"object":return s;default:return""}}function nf(s){var u=s.type;return(s=s.nodeName)&&s.toLowerCase()==="input"&&(u==="checkbox"||u==="radio")}function zs(s){var u=nf(s)?"checked":"value",p=Object.getOwnPropertyDescriptor(s.constructor.prototype,u),y=""+s[u];if(!s.hasOwnProperty(u)&&typeof p<"u"&&typeof p.get=="function"&&typeof p.set=="function"){var E=p.get,C=p.set;return Object.defineProperty(s,u,{configurable:!0,get:function(){return E.call(this)},set:function(F){y=""+F,C.call(this,F)}}),Object.defineProperty(s,u,{enumerable:p.enumerable}),{getValue:function(){return y},setValue:function(F){y=""+F},stopTracking:function(){s._valueTracker=null,delete s[u]}}}}function qs(s){s._valueTracker||(s._valueTracker=zs(s))}function rf(s){if(!s)return!1;var u=s._valueTracker;if(!u)return!0;var p=u.getValue(),y="";return s&&(y=nf(s)?s.checked?"true":"false":s.value),s=y,s!==p?(u.setValue(s),!0):!1}function Zi(s){if(s=s||(typeof document<"u"?document:void 0),typeof s>"u")return null;try{return s.activeElement||s.body}catch{return s.body}}var Em=/[\n"\\]/g;function Rn(s){return s.replace(Em,function(u){return"\\"+u.charCodeAt(0).toString(16)+" "})}function Fs(s,u,p,y,E,C,F,Z){s.name="",F!=null&&typeof F!="function"&&typeof F!="symbol"&&typeof F!="boolean"?s.type=F:s.removeAttribute("type"),u!=null?F==="number"?(u===0&&s.value===""||s.value!=u)&&(s.value=""+Nn(u)):s.value!==""+Nn(u)&&(s.value=""+Nn(u)):F!=="submit"&&F!=="reset"||s.removeAttribute("value"),u!=null?km(s,F,Nn(u)):p!=null?km(s,F,Nn(p)):y!=null&&s.removeAttribute("value"),E==null&&C!=null&&(s.defaultChecked=!!C),E!=null&&(s.checked=E&&typeof E!="function"&&typeof E!="symbol"),Z!=null&&typeof Z!="function"&&typeof Z!="symbol"&&typeof Z!="boolean"?s.name=""+Nn(Z):s.removeAttribute("name")}function BE(s,u,p,y,E,C,F,Z){if(C!=null&&typeof C!="function"&&typeof C!="symbol"&&typeof C!="boolean"&&(s.type=C),u!=null||p!=null){if(!(C!=="submit"&&C!=="reset"||u!=null))return;p=p!=null?""+Nn(p):"",u=u!=null?""+Nn(u):p,Z||u===s.value||(s.value=u),s.defaultValue=u}y=y??E,y=typeof y!="function"&&typeof y!="symbol"&&!!y,s.checked=Z?s.checked:!!y,s.defaultChecked=!!y,F!=null&&typeof F!="function"&&typeof F!="symbol"&&typeof F!="boolean"&&(s.name=F)}function km(s,u,p){u==="number"&&Zi(s.ownerDocument)===s||s.defaultValue===""+p||(s.defaultValue=""+p)}function Bs(s,u,p,y){if(s=s.options,u){u={};for(var E=0;E<p.length;E++)u["$"+p[E]]=!0;for(p=0;p<s.length;p++)E=u.hasOwnProperty("$"+s[p].value),s[p].selected!==E&&(s[p].selected=E),E&&y&&(s[p].defaultSelected=!0)}else{for(p=""+Nn(p),u=null,E=0;E<s.length;E++){if(s[E].value===p){s[E].selected=!0,y&&(s[E].defaultSelected=!0);return}u!==null||s[E].disabled||(u=s[E])}u!==null&&(u.selected=!0)}}function UE(s,u,p){if(u!=null&&(u=""+Nn(u),u!==s.value&&(s.value=u),p==null)){s.defaultValue!==u&&(s.defaultValue=u);return}s.defaultValue=p!=null?""+Nn(p):""}function VE(s,u,p,y){if(u==null){if(y!=null){if(p!=null)throw Error(r(92));if(H(y)){if(1<y.length)throw Error(r(93));y=y[0]}p=y}p==null&&(p=""),u=p}p=Nn(u),s.defaultValue=p,y=s.textContent,y===p&&y!==""&&y!==null&&(s.value=y)}function Us(s,u){if(u){var p=s.firstChild;if(p&&p===s.lastChild&&p.nodeType===3){p.nodeValue=u;return}}s.textContent=u}var t8=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function HE(s,u,p){var y=u.indexOf("--")===0;p==null||typeof p=="boolean"||p===""?y?s.setProperty(u,""):u==="float"?s.cssFloat="":s[u]="":y?s.setProperty(u,p):typeof p!="number"||p===0||t8.has(u)?u==="float"?s.cssFloat=p:s[u]=(""+p).trim():s[u]=p+"px"}function GE(s,u,p){if(u!=null&&typeof u!="object")throw Error(r(62));if(s=s.style,p!=null){for(var y in p)!p.hasOwnProperty(y)||u!=null&&u.hasOwnProperty(y)||(y.indexOf("--")===0?s.setProperty(y,""):y==="float"?s.cssFloat="":s[y]="");for(var E in u)y=u[E],u.hasOwnProperty(E)&&p[E]!==y&&HE(s,E,y)}else for(var C in u)u.hasOwnProperty(C)&&HE(s,C,u[C])}function Am(s){if(s.indexOf("-")===-1)return!1;switch(s){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var n8=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),r8=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function af(s){return r8.test(""+s)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":s}var Tm=null;function Cm(s){return s=s.target||s.srcElement||window,s.correspondingUseElement&&(s=s.correspondingUseElement),s.nodeType===3?s.parentNode:s}var Vs=null,Hs=null;function YE(s){var u=oi(s);if(u&&(s=u.stateNode)){var p=s[yn]||null;e:switch(s=u.stateNode,u.type){case"input":if(Fs(s,p.value,p.defaultValue,p.defaultValue,p.checked,p.defaultChecked,p.type,p.name),u=p.name,p.type==="radio"&&u!=null){for(p=s;p.parentNode;)p=p.parentNode;for(p=p.querySelectorAll('input[name="'+Rn(""+u)+'"][type="radio"]'),u=0;u<p.length;u++){var y=p[u];if(y!==s&&y.form===s.form){var E=y[yn]||null;if(!E)throw Error(r(90));Fs(y,E.value,E.defaultValue,E.defaultValue,E.checked,E.defaultChecked,E.type,E.name)}}for(u=0;u<p.length;u++)y=p[u],y.form===s.form&&rf(y)}break e;case"textarea":UE(s,p.value,p.defaultValue);break e;case"select":u=p.value,u!=null&&Bs(s,!!p.multiple,u,!1)}}}var Om=!1;function ZE(s,u,p){if(Om)return s(u,p);Om=!0;try{var y=s(u);return y}finally{if(Om=!1,(Vs!==null||Hs!==null)&&(Vf(),Vs&&(u=Vs,s=Hs,Hs=Vs=null,YE(u),s)))for(u=0;u<s.length;u++)YE(s[u])}}function Al(s,u){var p=s.stateNode;if(p===null)return null;var y=p[yn]||null;if(y===null)return null;p=y[u];e:switch(u){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(y=!y.disabled)||(s=s.type,y=!(s==="button"||s==="input"||s==="select"||s==="textarea")),s=!y;break e;default:s=!1}if(s)return null;if(p&&typeof p!="function")throw Error(r(231,u,typeof p));return p}var ui=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Nm=!1;if(ui)try{var Tl={};Object.defineProperty(Tl,"passive",{get:function(){Nm=!0}}),window.addEventListener("test",Tl,Tl),window.removeEventListener("test",Tl,Tl)}catch{Nm=!1}var Ki=null,Rm=null,sf=null;function KE(){if(sf)return sf;var s,u=Rm,p=u.length,y,E="value"in Ki?Ki.value:Ki.textContent,C=E.length;for(s=0;s<p&&u[s]===E[s];s++);var F=p-s;for(y=1;y<=F&&u[p-y]===E[C-y];y++);return sf=E.slice(s,1<y?1-y:void 0)}function of(s){var u=s.keyCode;return"charCode"in s?(s=s.charCode,s===0&&u===13&&(s=13)):s=u,s===10&&(s=13),32<=s||s===13?s:0}function lf(){return!0}function XE(){return!1}function jn(s){function u(p,y,E,C,F){this._reactName=p,this._targetInst=E,this.type=y,this.nativeEvent=C,this.target=F,this.currentTarget=null;for(var Z in s)s.hasOwnProperty(Z)&&(p=s[Z],this[Z]=p?p(C):C[Z]);return this.isDefaultPrevented=(C.defaultPrevented!=null?C.defaultPrevented:C.returnValue===!1)?lf:XE,this.isPropagationStopped=XE,this}return d(u.prototype,{preventDefault:function(){this.defaultPrevented=!0;var p=this.nativeEvent;p&&(p.preventDefault?p.preventDefault():typeof p.returnValue!="unknown"&&(p.returnValue=!1),this.isDefaultPrevented=lf)},stopPropagation:function(){var p=this.nativeEvent;p&&(p.stopPropagation?p.stopPropagation():typeof p.cancelBubble!="unknown"&&(p.cancelBubble=!0),this.isPropagationStopped=lf)},persist:function(){},isPersistent:lf}),u}var Fa={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(s){return s.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},uf=jn(Fa),Cl=d({},Fa,{view:0,detail:0}),i8=jn(Cl),jm,Mm,Ol,cf=d({},Cl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Dm,button:0,buttons:0,relatedTarget:function(s){return s.relatedTarget===void 0?s.fromElement===s.srcElement?s.toElement:s.fromElement:s.relatedTarget},movementX:function(s){return"movementX"in s?s.movementX:(s!==Ol&&(Ol&&s.type==="mousemove"?(jm=s.screenX-Ol.screenX,Mm=s.screenY-Ol.screenY):Mm=jm=0,Ol=s),jm)},movementY:function(s){return"movementY"in s?s.movementY:Mm}}),WE=jn(cf),a8=d({},cf,{dataTransfer:0}),s8=jn(a8),o8=d({},Cl,{relatedTarget:0}),$m=jn(o8),l8=d({},Fa,{animationName:0,elapsedTime:0,pseudoElement:0}),u8=jn(l8),c8=d({},Fa,{clipboardData:function(s){return"clipboardData"in s?s.clipboardData:window.clipboardData}}),f8=jn(c8),d8=d({},Fa,{data:0}),QE=jn(d8),h8={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},p8={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},m8={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function g8(s){var u=this.nativeEvent;return u.getModifierState?u.getModifierState(s):(s=m8[s])?!!u[s]:!1}function Dm(){return g8}var y8=d({},Cl,{key:function(s){if(s.key){var u=h8[s.key]||s.key;if(u!=="Unidentified")return u}return s.type==="keypress"?(s=of(s),s===13?"Enter":String.fromCharCode(s)):s.type==="keydown"||s.type==="keyup"?p8[s.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Dm,charCode:function(s){return s.type==="keypress"?of(s):0},keyCode:function(s){return s.type==="keydown"||s.type==="keyup"?s.keyCode:0},which:function(s){return s.type==="keypress"?of(s):s.type==="keydown"||s.type==="keyup"?s.keyCode:0}}),b8=jn(y8),v8=d({},cf,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),JE=jn(v8),_8=d({},Cl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Dm}),x8=jn(_8),w8=d({},Fa,{propertyName:0,elapsedTime:0,pseudoElement:0}),S8=jn(w8),E8=d({},cf,{deltaX:function(s){return"deltaX"in s?s.deltaX:"wheelDeltaX"in s?-s.wheelDeltaX:0},deltaY:function(s){return"deltaY"in s?s.deltaY:"wheelDeltaY"in s?-s.wheelDeltaY:"wheelDelta"in s?-s.wheelDelta:0},deltaZ:0,deltaMode:0}),k8=jn(E8),A8=d({},Fa,{newState:0,oldState:0}),T8=jn(A8),C8=[9,13,27,32],Im=ui&&"CompositionEvent"in window,Nl=null;ui&&"documentMode"in document&&(Nl=document.documentMode);var O8=ui&&"TextEvent"in window&&!Nl,ek=ui&&(!Im||Nl&&8<Nl&&11>=Nl),tk=" ",nk=!1;function rk(s,u){switch(s){case"keyup":return C8.indexOf(u.keyCode)!==-1;case"keydown":return u.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function ik(s){return s=s.detail,typeof s=="object"&&"data"in s?s.data:null}var Gs=!1;function N8(s,u){switch(s){case"compositionend":return ik(u);case"keypress":return u.which!==32?null:(nk=!0,tk);case"textInput":return s=u.data,s===tk&&nk?null:s;default:return null}}function R8(s,u){if(Gs)return s==="compositionend"||!Im&&rk(s,u)?(s=KE(),sf=Rm=Ki=null,Gs=!1,s):null;switch(s){case"paste":return null;case"keypress":if(!(u.ctrlKey||u.altKey||u.metaKey)||u.ctrlKey&&u.altKey){if(u.char&&1<u.char.length)return u.char;if(u.which)return String.fromCharCode(u.which)}return null;case"compositionend":return ek&&u.locale!=="ko"?null:u.data;default:return null}}var j8={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function ak(s){var u=s&&s.nodeName&&s.nodeName.toLowerCase();return u==="input"?!!j8[s.type]:u==="textarea"}function sk(s,u,p,y){Vs?Hs?Hs.push(y):Hs=[y]:Vs=y,u=Xf(u,"onChange"),0<u.length&&(p=new uf("onChange","change",null,p,y),s.push({event:p,listeners:u}))}var Rl=null,jl=null;function M8(s){q2(s,0)}function ff(s){var u=Vi(s);if(rf(u))return s}function ok(s,u){if(s==="change")return u}var lk=!1;if(ui){var Pm;if(ui){var Lm="oninput"in document;if(!Lm){var uk=document.createElement("div");uk.setAttribute("oninput","return;"),Lm=typeof uk.oninput=="function"}Pm=Lm}else Pm=!1;lk=Pm&&(!document.documentMode||9<document.documentMode)}function ck(){Rl&&(Rl.detachEvent("onpropertychange",fk),jl=Rl=null)}function fk(s){if(s.propertyName==="value"&&ff(jl)){var u=[];sk(u,jl,s,Cm(s)),ZE(M8,u)}}function $8(s,u,p){s==="focusin"?(ck(),Rl=u,jl=p,Rl.attachEvent("onpropertychange",fk)):s==="focusout"&&ck()}function D8(s){if(s==="selectionchange"||s==="keyup"||s==="keydown")return ff(jl)}function I8(s,u){if(s==="click")return ff(u)}function P8(s,u){if(s==="input"||s==="change")return ff(u)}function L8(s,u){return s===u&&(s!==0||1/s===1/u)||s!==s&&u!==u}var Un=typeof Object.is=="function"?Object.is:L8;function Ml(s,u){if(Un(s,u))return!0;if(typeof s!="object"||s===null||typeof u!="object"||u===null)return!1;var p=Object.keys(s),y=Object.keys(u);if(p.length!==y.length)return!1;for(y=0;y<p.length;y++){var E=p[y];if(!J.call(u,E)||!Un(s[E],u[E]))return!1}return!0}function dk(s){for(;s&&s.firstChild;)s=s.firstChild;return s}function hk(s,u){var p=dk(s);s=0;for(var y;p;){if(p.nodeType===3){if(y=s+p.textContent.length,s<=u&&y>=u)return{node:p,offset:u-s};s=y}e:{for(;p;){if(p.nextSibling){p=p.nextSibling;break e}p=p.parentNode}p=void 0}p=dk(p)}}function pk(s,u){return s&&u?s===u?!0:s&&s.nodeType===3?!1:u&&u.nodeType===3?pk(s,u.parentNode):"contains"in s?s.contains(u):s.compareDocumentPosition?!!(s.compareDocumentPosition(u)&16):!1:!1}function mk(s){s=s!=null&&s.ownerDocument!=null&&s.ownerDocument.defaultView!=null?s.ownerDocument.defaultView:window;for(var u=Zi(s.document);u instanceof s.HTMLIFrameElement;){try{var p=typeof u.contentWindow.location.href=="string"}catch{p=!1}if(p)s=u.contentWindow;else break;u=Zi(s.document)}return u}function zm(s){var u=s&&s.nodeName&&s.nodeName.toLowerCase();return u&&(u==="input"&&(s.type==="text"||s.type==="search"||s.type==="tel"||s.type==="url"||s.type==="password")||u==="textarea"||s.contentEditable==="true")}var z8=ui&&"documentMode"in document&&11>=document.documentMode,Ys=null,qm=null,$l=null,Fm=!1;function gk(s,u,p){var y=p.window===p?p.document:p.nodeType===9?p:p.ownerDocument;Fm||Ys==null||Ys!==Zi(y)||(y=Ys,"selectionStart"in y&&zm(y)?y={start:y.selectionStart,end:y.selectionEnd}:(y=(y.ownerDocument&&y.ownerDocument.defaultView||window).getSelection(),y={anchorNode:y.anchorNode,anchorOffset:y.anchorOffset,focusNode:y.focusNode,focusOffset:y.focusOffset}),$l&&Ml($l,y)||($l=y,y=Xf(qm,"onSelect"),0<y.length&&(u=new uf("onSelect","select",null,u,p),s.push({event:u,listeners:y}),u.target=Ys)))}function Ba(s,u){var p={};return p[s.toLowerCase()]=u.toLowerCase(),p["Webkit"+s]="webkit"+u,p["Moz"+s]="moz"+u,p}var Zs={animationend:Ba("Animation","AnimationEnd"),animationiteration:Ba("Animation","AnimationIteration"),animationstart:Ba("Animation","AnimationStart"),transitionrun:Ba("Transition","TransitionRun"),transitionstart:Ba("Transition","TransitionStart"),transitioncancel:Ba("Transition","TransitionCancel"),transitionend:Ba("Transition","TransitionEnd")},Bm={},yk={};ui&&(yk=document.createElement("div").style,"AnimationEvent"in window||(delete Zs.animationend.animation,delete Zs.animationiteration.animation,delete Zs.animationstart.animation),"TransitionEvent"in window||delete Zs.transitionend.transition);function Ua(s){if(Bm[s])return Bm[s];if(!Zs[s])return s;var u=Zs[s],p;for(p in u)if(u.hasOwnProperty(p)&&p in yk)return Bm[s]=u[p];return s}var bk=Ua("animationend"),vk=Ua("animationiteration"),_k=Ua("animationstart"),q8=Ua("transitionrun"),F8=Ua("transitionstart"),B8=Ua("transitioncancel"),xk=Ua("transitionend"),wk=new Map,Um="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");Um.push("scrollEnd");function wr(s,u){wk.set(s,u),li(u,[s])}var Sk=new WeakMap;function ur(s,u){if(typeof s=="object"&&s!==null){var p=Sk.get(s);return p!==void 0?p:(u={value:s,source:u,stack:tf(u)},Sk.set(s,u),u)}return{value:s,source:u,stack:tf(u)}}var cr=[],Ks=0,Vm=0;function df(){for(var s=Ks,u=Vm=Ks=0;u<s;){var p=cr[u];cr[u++]=null;var y=cr[u];cr[u++]=null;var E=cr[u];cr[u++]=null;var C=cr[u];if(cr[u++]=null,y!==null&&E!==null){var F=y.pending;F===null?E.next=E:(E.next=F.next,F.next=E),y.pending=E}C!==0&&Ek(p,E,C)}}function hf(s,u,p,y){cr[Ks++]=s,cr[Ks++]=u,cr[Ks++]=p,cr[Ks++]=y,Vm|=y,s.lanes|=y,s=s.alternate,s!==null&&(s.lanes|=y)}function Hm(s,u,p,y){return hf(s,u,p,y),pf(s)}function Xs(s,u){return hf(s,null,null,u),pf(s)}function Ek(s,u,p){s.lanes|=p;var y=s.alternate;y!==null&&(y.lanes|=p);for(var E=!1,C=s.return;C!==null;)C.childLanes|=p,y=C.alternate,y!==null&&(y.childLanes|=p),C.tag===22&&(s=C.stateNode,s===null||s._visibility&1||(E=!0)),s=C,C=C.return;return s.tag===3?(C=s.stateNode,E&&u!==null&&(E=31-je(p),s=C.hiddenUpdates,y=s[E],y===null?s[E]=[u]:y.push(u),u.lane=p|536870912),C):null}function pf(s){if(50<au)throw au=0,Wg=null,Error(r(185));for(var u=s.return;u!==null;)s=u,u=s.return;return s.tag===3?s.stateNode:null}var Ws={};function U8(s,u,p,y){this.tag=s,this.key=p,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=u,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=y,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Vn(s,u,p,y){return new U8(s,u,p,y)}function Gm(s){return s=s.prototype,!(!s||!s.isReactComponent)}function ci(s,u){var p=s.alternate;return p===null?(p=Vn(s.tag,u,s.key,s.mode),p.elementType=s.elementType,p.type=s.type,p.stateNode=s.stateNode,p.alternate=s,s.alternate=p):(p.pendingProps=u,p.type=s.type,p.flags=0,p.subtreeFlags=0,p.deletions=null),p.flags=s.flags&65011712,p.childLanes=s.childLanes,p.lanes=s.lanes,p.child=s.child,p.memoizedProps=s.memoizedProps,p.memoizedState=s.memoizedState,p.updateQueue=s.updateQueue,u=s.dependencies,p.dependencies=u===null?null:{lanes:u.lanes,firstContext:u.firstContext},p.sibling=s.sibling,p.index=s.index,p.ref=s.ref,p.refCleanup=s.refCleanup,p}function kk(s,u){s.flags&=65011714;var p=s.alternate;return p===null?(s.childLanes=0,s.lanes=u,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=p.childLanes,s.lanes=p.lanes,s.child=p.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=p.memoizedProps,s.memoizedState=p.memoizedState,s.updateQueue=p.updateQueue,s.type=p.type,u=p.dependencies,s.dependencies=u===null?null:{lanes:u.lanes,firstContext:u.firstContext}),s}function mf(s,u,p,y,E,C){var F=0;if(y=s,typeof s=="function")Gm(s)&&(F=1);else if(typeof s=="string")F=Hz(s,p,I.current)?26:s==="html"||s==="head"||s==="body"?27:5;else e:switch(s){case L:return s=Vn(31,p,u,E),s.elementType=L,s.lanes=C,s;case v:return Va(p.children,E,C,u);case w:F=8,E|=24;break;case b:return s=Vn(12,p,u,E|2),s.elementType=b,s.lanes=C,s;case k:return s=Vn(13,p,u,E),s.elementType=k,s.lanes=C,s;case T:return s=Vn(19,p,u,E),s.elementType=T,s.lanes=C,s;default:if(typeof s=="object"&&s!==null)switch(s.$$typeof){case _:case x:F=10;break e;case S:F=9;break e;case A:F=11;break e;case O:F=14;break e;case $:F=16,y=null;break e}F=29,p=Error(r(130,s===null?"null":typeof s,"")),y=null}return u=Vn(F,p,u,E),u.elementType=s,u.type=y,u.lanes=C,u}function Va(s,u,p,y){return s=Vn(7,s,y,u),s.lanes=p,s}function Ym(s,u,p){return s=Vn(6,s,null,u),s.lanes=p,s}function Zm(s,u,p){return u=Vn(4,s.children!==null?s.children:[],s.key,u),u.lanes=p,u.stateNode={containerInfo:s.containerInfo,pendingChildren:null,implementation:s.implementation},u}var Qs=[],Js=0,gf=null,yf=0,fr=[],dr=0,Ha=null,fi=1,di="";function Ga(s,u){Qs[Js++]=yf,Qs[Js++]=gf,gf=s,yf=u}function Ak(s,u,p){fr[dr++]=fi,fr[dr++]=di,fr[dr++]=Ha,Ha=s;var y=fi;s=di;var E=32-je(y)-1;y&=~(1<<E),p+=1;var C=32-je(u)+E;if(30<C){var F=E-E%5;C=(y&(1<<F)-1).toString(32),y>>=F,E-=F,fi=1<<32-je(u)+E|p<<E|y,di=C+s}else fi=1<<C|p<<E|y,di=s}function Km(s){s.return!==null&&(Ga(s,1),Ak(s,1,0))}function Xm(s){for(;s===gf;)gf=Qs[--Js],Qs[Js]=null,yf=Qs[--Js],Qs[Js]=null;for(;s===Ha;)Ha=fr[--dr],fr[dr]=null,di=fr[--dr],fr[dr]=null,fi=fr[--dr],fr[dr]=null}var Sn=null,qt=null,pt=!1,Ya=null,qr=!1,Wm=Error(r(519));function Za(s){var u=Error(r(418,""));throw Pl(ur(u,s)),Wm}function Tk(s){var u=s.stateNode,p=s.type,y=s.memoizedProps;switch(u[sn]=s,u[yn]=y,p){case"dialog":tt("cancel",u),tt("close",u);break;case"iframe":case"object":case"embed":tt("load",u);break;case"video":case"audio":for(p=0;p<ou.length;p++)tt(ou[p],u);break;case"source":tt("error",u);break;case"img":case"image":case"link":tt("error",u),tt("load",u);break;case"details":tt("toggle",u);break;case"input":tt("invalid",u),BE(u,y.value,y.defaultValue,y.checked,y.defaultChecked,y.type,y.name,!0),qs(u);break;case"select":tt("invalid",u);break;case"textarea":tt("invalid",u),VE(u,y.value,y.defaultValue,y.children),qs(u)}p=y.children,typeof p!="string"&&typeof p!="number"&&typeof p!="bigint"||u.textContent===""+p||y.suppressHydrationWarning===!0||V2(u.textContent,p)?(y.popover!=null&&(tt("beforetoggle",u),tt("toggle",u)),y.onScroll!=null&&tt("scroll",u),y.onScrollEnd!=null&&tt("scrollend",u),y.onClick!=null&&(u.onclick=Wf),u=!0):u=!1,u||Za(s)}function Ck(s){for(Sn=s.return;Sn;)switch(Sn.tag){case 5:case 13:qr=!1;return;case 27:case 3:qr=!0;return;default:Sn=Sn.return}}function Dl(s){if(s!==Sn)return!1;if(!pt)return Ck(s),pt=!0,!1;var u=s.tag,p;if((p=u!==3&&u!==27)&&((p=u===5)&&(p=s.type,p=!(p!=="form"&&p!=="button")||hy(s.type,s.memoizedProps)),p=!p),p&&qt&&Za(s),Ck(s),u===13){if(s=s.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(r(317));e:{for(s=s.nextSibling,u=0;s;){if(s.nodeType===8)if(p=s.data,p==="/$"){if(u===0){qt=Er(s.nextSibling);break e}u--}else p!=="$"&&p!=="$!"&&p!=="$?"||u++;s=s.nextSibling}qt=null}}else u===27?(u=qt,fa(s.type)?(s=yy,yy=null,qt=s):qt=u):qt=Sn?Er(s.stateNode.nextSibling):null;return!0}function Il(){qt=Sn=null,pt=!1}function Ok(){var s=Ya;return s!==null&&(Dn===null?Dn=s:Dn.push.apply(Dn,s),Ya=null),s}function Pl(s){Ya===null?Ya=[s]:Ya.push(s)}var Qm=V(null),Ka=null,hi=null;function Xi(s,u,p){j(Qm,u._currentValue),u._currentValue=p}function pi(s){s._currentValue=Qm.current,X(Qm)}function Jm(s,u,p){for(;s!==null;){var y=s.alternate;if((s.childLanes&u)!==u?(s.childLanes|=u,y!==null&&(y.childLanes|=u)):y!==null&&(y.childLanes&u)!==u&&(y.childLanes|=u),s===p)break;s=s.return}}function eg(s,u,p,y){var E=s.child;for(E!==null&&(E.return=s);E!==null;){var C=E.dependencies;if(C!==null){var F=E.child;C=C.firstContext;e:for(;C!==null;){var Z=C;C=E;for(var ee=0;ee<u.length;ee++)if(Z.context===u[ee]){C.lanes|=p,Z=C.alternate,Z!==null&&(Z.lanes|=p),Jm(C.return,p,s),y||(F=null);break e}C=Z.next}}else if(E.tag===18){if(F=E.return,F===null)throw Error(r(341));F.lanes|=p,C=F.alternate,C!==null&&(C.lanes|=p),Jm(F,p,s),F=null}else F=E.child;if(F!==null)F.return=E;else for(F=E;F!==null;){if(F===s){F=null;break}if(E=F.sibling,E!==null){E.return=F.return,F=E;break}F=F.return}E=F}}function Ll(s,u,p,y){s=null;for(var E=u,C=!1;E!==null;){if(!C){if((E.flags&524288)!==0)C=!0;else if((E.flags&262144)!==0)break}if(E.tag===10){var F=E.alternate;if(F===null)throw Error(r(387));if(F=F.memoizedProps,F!==null){var Z=E.type;Un(E.pendingProps.value,F.value)||(s!==null?s.push(Z):s=[Z])}}else if(E===ne.current){if(F=E.alternate,F===null)throw Error(r(387));F.memoizedState.memoizedState!==E.memoizedState.memoizedState&&(s!==null?s.push(hu):s=[hu])}E=E.return}s!==null&&eg(u,s,p,y),u.flags|=262144}function bf(s){for(s=s.firstContext;s!==null;){if(!Un(s.context._currentValue,s.memoizedValue))return!0;s=s.next}return!1}function Xa(s){Ka=s,hi=null,s=s.dependencies,s!==null&&(s.firstContext=null)}function bn(s){return Nk(Ka,s)}function vf(s,u){return Ka===null&&Xa(s),Nk(s,u)}function Nk(s,u){var p=u._currentValue;if(u={context:u,memoizedValue:p,next:null},hi===null){if(s===null)throw Error(r(308));hi=u,s.dependencies={lanes:0,firstContext:u},s.flags|=524288}else hi=hi.next=u;return p}var V8=typeof AbortController<"u"?AbortController:function(){var s=[],u=this.signal={aborted:!1,addEventListener:function(p,y){s.push(y)}};this.abort=function(){u.aborted=!0,s.forEach(function(p){return p()})}},H8=e.unstable_scheduleCallback,G8=e.unstable_NormalPriority,tn={$$typeof:x,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function tg(){return{controller:new V8,data:new Map,refCount:0}}function zl(s){s.refCount--,s.refCount===0&&H8(G8,function(){s.controller.abort()})}var ql=null,ng=0,eo=0,to=null;function Y8(s,u){if(ql===null){var p=ql=[];ng=0,eo=iy(),to={status:"pending",value:void 0,then:function(y){p.push(y)}}}return ng++,u.then(Rk,Rk),u}function Rk(){if(--ng===0&&ql!==null){to!==null&&(to.status="fulfilled");var s=ql;ql=null,eo=0,to=null;for(var u=0;u<s.length;u++)(0,s[u])()}}function Z8(s,u){var p=[],y={status:"pending",value:null,reason:null,then:function(E){p.push(E)}};return s.then(function(){y.status="fulfilled",y.value=u;for(var E=0;E<p.length;E++)(0,p[E])(u)},function(E){for(y.status="rejected",y.reason=E,E=0;E<p.length;E++)(0,p[E])(void 0)}),y}var jk=B.S;B.S=function(s,u){typeof u=="object"&&u!==null&&typeof u.then=="function"&&Y8(s,u),jk!==null&&jk(s,u)};var Wa=V(null);function rg(){var s=Wa.current;return s!==null?s:Nt.pooledCache}function _f(s,u){u===null?j(Wa,Wa.current):j(Wa,u.pool)}function Mk(){var s=rg();return s===null?null:{parent:tn._currentValue,pool:s}}var Fl=Error(r(460)),$k=Error(r(474)),xf=Error(r(542)),ig={then:function(){}};function Dk(s){return s=s.status,s==="fulfilled"||s==="rejected"}function wf(){}function Ik(s,u,p){switch(p=s[p],p===void 0?s.push(u):p!==u&&(u.then(wf,wf),u=p),u.status){case"fulfilled":return u.value;case"rejected":throw s=u.reason,Lk(s),s;default:if(typeof u.status=="string")u.then(wf,wf);else{if(s=Nt,s!==null&&100<s.shellSuspendCounter)throw Error(r(482));s=u,s.status="pending",s.then(function(y){if(u.status==="pending"){var E=u;E.status="fulfilled",E.value=y}},function(y){if(u.status==="pending"){var E=u;E.status="rejected",E.reason=y}})}switch(u.status){case"fulfilled":return u.value;case"rejected":throw s=u.reason,Lk(s),s}throw Bl=u,Fl}}var Bl=null;function Pk(){if(Bl===null)throw Error(r(459));var s=Bl;return Bl=null,s}function Lk(s){if(s===Fl||s===xf)throw Error(r(483))}var Wi=!1;function ag(s){s.updateQueue={baseState:s.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function sg(s,u){s=s.updateQueue,u.updateQueue===s&&(u.updateQueue={baseState:s.baseState,firstBaseUpdate:s.firstBaseUpdate,lastBaseUpdate:s.lastBaseUpdate,shared:s.shared,callbacks:null})}function Qi(s){return{lane:s,tag:0,payload:null,callback:null,next:null}}function Ji(s,u,p){var y=s.updateQueue;if(y===null)return null;if(y=y.shared,(bt&2)!==0){var E=y.pending;return E===null?u.next=u:(u.next=E.next,E.next=u),y.pending=u,u=pf(s),Ek(s,null,p),u}return hf(s,y,u,p),pf(s)}function Ul(s,u,p){if(u=u.updateQueue,u!==null&&(u=u.shared,(p&4194048)!==0)){var y=u.lanes;y&=s.pendingLanes,p|=y,u.lanes=p,Yc(s,p)}}function og(s,u){var p=s.updateQueue,y=s.alternate;if(y!==null&&(y=y.updateQueue,p===y)){var E=null,C=null;if(p=p.firstBaseUpdate,p!==null){do{var F={lane:p.lane,tag:p.tag,payload:p.payload,callback:null,next:null};C===null?E=C=F:C=C.next=F,p=p.next}while(p!==null);C===null?E=C=u:C=C.next=u}else E=C=u;p={baseState:y.baseState,firstBaseUpdate:E,lastBaseUpdate:C,shared:y.shared,callbacks:y.callbacks},s.updateQueue=p;return}s=p.lastBaseUpdate,s===null?p.firstBaseUpdate=u:s.next=u,p.lastBaseUpdate=u}var lg=!1;function Vl(){if(lg){var s=to;if(s!==null)throw s}}function Hl(s,u,p,y){lg=!1;var E=s.updateQueue;Wi=!1;var C=E.firstBaseUpdate,F=E.lastBaseUpdate,Z=E.shared.pending;if(Z!==null){E.shared.pending=null;var ee=Z,ce=ee.next;ee.next=null,F===null?C=ce:F.next=ce,F=ee;var ge=s.alternate;ge!==null&&(ge=ge.updateQueue,Z=ge.lastBaseUpdate,Z!==F&&(Z===null?ge.firstBaseUpdate=ce:Z.next=ce,ge.lastBaseUpdate=ee))}if(C!==null){var ve=E.baseState;F=0,ge=ce=ee=null,Z=C;do{var de=Z.lane&-536870913,he=de!==Z.lane;if(he?(at&de)===de:(y&de)===de){de!==0&&de===eo&&(lg=!0),ge!==null&&(ge=ge.next={lane:0,tag:Z.tag,payload:Z.payload,callback:null,next:null});e:{var Fe=s,Le=Z;de=u;var Et=p;switch(Le.tag){case 1:if(Fe=Le.payload,typeof Fe=="function"){ve=Fe.call(Et,ve,de);break e}ve=Fe;break e;case 3:Fe.flags=Fe.flags&-65537|128;case 0:if(Fe=Le.payload,de=typeof Fe=="function"?Fe.call(Et,ve,de):Fe,de==null)break e;ve=d({},ve,de);break e;case 2:Wi=!0}}de=Z.callback,de!==null&&(s.flags|=64,he&&(s.flags|=8192),he=E.callbacks,he===null?E.callbacks=[de]:he.push(de))}else he={lane:de,tag:Z.tag,payload:Z.payload,callback:Z.callback,next:null},ge===null?(ce=ge=he,ee=ve):ge=ge.next=he,F|=de;if(Z=Z.next,Z===null){if(Z=E.shared.pending,Z===null)break;he=Z,Z=he.next,he.next=null,E.lastBaseUpdate=he,E.shared.pending=null}}while(!0);ge===null&&(ee=ve),E.baseState=ee,E.firstBaseUpdate=ce,E.lastBaseUpdate=ge,C===null&&(E.shared.lanes=0),oa|=F,s.lanes=F,s.memoizedState=ve}}function zk(s,u){if(typeof s!="function")throw Error(r(191,s));s.call(u)}function qk(s,u){var p=s.callbacks;if(p!==null)for(s.callbacks=null,s=0;s<p.length;s++)zk(p[s],u)}var no=V(null),Sf=V(0);function Fk(s,u){s=xi,j(Sf,s),j(no,u),xi=s|u.baseLanes}function ug(){j(Sf,xi),j(no,no.current)}function cg(){xi=Sf.current,X(no),X(Sf)}var ea=0,Ze=null,wt=null,Kt=null,Ef=!1,ro=!1,Qa=!1,kf=0,Gl=0,io=null,K8=0;function Vt(){throw Error(r(321))}function fg(s,u){if(u===null)return!1;for(var p=0;p<u.length&&p<s.length;p++)if(!Un(s[p],u[p]))return!1;return!0}function dg(s,u,p,y,E,C){return ea=C,Ze=u,u.memoizedState=null,u.updateQueue=null,u.lanes=0,B.H=s===null||s.memoizedState===null?EA:kA,Qa=!1,C=p(y,E),Qa=!1,ro&&(C=Uk(u,p,y,E)),Bk(s),C}function Bk(s){B.H=Rf;var u=wt!==null&&wt.next!==null;if(ea=0,Kt=wt=Ze=null,Ef=!1,Gl=0,io=null,u)throw Error(r(300));s===null||on||(s=s.dependencies,s!==null&&bf(s)&&(on=!0))}function Uk(s,u,p,y){Ze=s;var E=0;do{if(ro&&(io=null),Gl=0,ro=!1,25<=E)throw Error(r(301));if(E+=1,Kt=wt=null,s.updateQueue!=null){var C=s.updateQueue;C.lastEffect=null,C.events=null,C.stores=null,C.memoCache!=null&&(C.memoCache.index=0)}B.H=nz,C=u(p,y)}while(ro);return C}function X8(){var s=B.H,u=s.useState()[0];return u=typeof u.then=="function"?Yl(u):u,s=s.useState()[0],(wt!==null?wt.memoizedState:null)!==s&&(Ze.flags|=1024),u}function hg(){var s=kf!==0;return kf=0,s}function pg(s,u,p){u.updateQueue=s.updateQueue,u.flags&=-2053,s.lanes&=~p}function mg(s){if(Ef){for(s=s.memoizedState;s!==null;){var u=s.queue;u!==null&&(u.pending=null),s=s.next}Ef=!1}ea=0,Kt=wt=Ze=null,ro=!1,Gl=kf=0,io=null}function Mn(){var s={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Kt===null?Ze.memoizedState=Kt=s:Kt=Kt.next=s,Kt}function Xt(){if(wt===null){var s=Ze.alternate;s=s!==null?s.memoizedState:null}else s=wt.next;var u=Kt===null?Ze.memoizedState:Kt.next;if(u!==null)Kt=u,wt=s;else{if(s===null)throw Ze.alternate===null?Error(r(467)):Error(r(310));wt=s,s={memoizedState:wt.memoizedState,baseState:wt.baseState,baseQueue:wt.baseQueue,queue:wt.queue,next:null},Kt===null?Ze.memoizedState=Kt=s:Kt=Kt.next=s}return Kt}function gg(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Yl(s){var u=Gl;return Gl+=1,io===null&&(io=[]),s=Ik(io,s,u),u=Ze,(Kt===null?u.memoizedState:Kt.next)===null&&(u=u.alternate,B.H=u===null||u.memoizedState===null?EA:kA),s}function Af(s){if(s!==null&&typeof s=="object"){if(typeof s.then=="function")return Yl(s);if(s.$$typeof===x)return bn(s)}throw Error(r(438,String(s)))}function yg(s){var u=null,p=Ze.updateQueue;if(p!==null&&(u=p.memoCache),u==null){var y=Ze.alternate;y!==null&&(y=y.updateQueue,y!==null&&(y=y.memoCache,y!=null&&(u={data:y.data.map(function(E){return E.slice()}),index:0})))}if(u==null&&(u={data:[],index:0}),p===null&&(p=gg(),Ze.updateQueue=p),p.memoCache=u,p=u.data[u.index],p===void 0)for(p=u.data[u.index]=Array(s),y=0;y<s;y++)p[y]=M;return u.index++,p}function mi(s,u){return typeof u=="function"?u(s):u}function Tf(s){var u=Xt();return bg(u,wt,s)}function bg(s,u,p){var y=s.queue;if(y===null)throw Error(r(311));y.lastRenderedReducer=p;var E=s.baseQueue,C=y.pending;if(C!==null){if(E!==null){var F=E.next;E.next=C.next,C.next=F}u.baseQueue=E=C,y.pending=null}if(C=s.baseState,E===null)s.memoizedState=C;else{u=E.next;var Z=F=null,ee=null,ce=u,ge=!1;do{var ve=ce.lane&-536870913;if(ve!==ce.lane?(at&ve)===ve:(ea&ve)===ve){var de=ce.revertLane;if(de===0)ee!==null&&(ee=ee.next={lane:0,revertLane:0,action:ce.action,hasEagerState:ce.hasEagerState,eagerState:ce.eagerState,next:null}),ve===eo&&(ge=!0);else if((ea&de)===de){ce=ce.next,de===eo&&(ge=!0);continue}else ve={lane:0,revertLane:ce.revertLane,action:ce.action,hasEagerState:ce.hasEagerState,eagerState:ce.eagerState,next:null},ee===null?(Z=ee=ve,F=C):ee=ee.next=ve,Ze.lanes|=de,oa|=de;ve=ce.action,Qa&&p(C,ve),C=ce.hasEagerState?ce.eagerState:p(C,ve)}else de={lane:ve,revertLane:ce.revertLane,action:ce.action,hasEagerState:ce.hasEagerState,eagerState:ce.eagerState,next:null},ee===null?(Z=ee=de,F=C):ee=ee.next=de,Ze.lanes|=ve,oa|=ve;ce=ce.next}while(ce!==null&&ce!==u);if(ee===null?F=C:ee.next=Z,!Un(C,s.memoizedState)&&(on=!0,ge&&(p=to,p!==null)))throw p;s.memoizedState=C,s.baseState=F,s.baseQueue=ee,y.lastRenderedState=C}return E===null&&(y.lanes=0),[s.memoizedState,y.dispatch]}function vg(s){var u=Xt(),p=u.queue;if(p===null)throw Error(r(311));p.lastRenderedReducer=s;var y=p.dispatch,E=p.pending,C=u.memoizedState;if(E!==null){p.pending=null;var F=E=E.next;do C=s(C,F.action),F=F.next;while(F!==E);Un(C,u.memoizedState)||(on=!0),u.memoizedState=C,u.baseQueue===null&&(u.baseState=C),p.lastRenderedState=C}return[C,y]}function Vk(s,u,p){var y=Ze,E=Xt(),C=pt;if(C){if(p===void 0)throw Error(r(407));p=p()}else p=u();var F=!Un((wt||E).memoizedState,p);F&&(E.memoizedState=p,on=!0),E=E.queue;var Z=Yk.bind(null,y,E,s);if(Zl(2048,8,Z,[s]),E.getSnapshot!==u||F||Kt!==null&&Kt.memoizedState.tag&1){if(y.flags|=2048,ao(9,Cf(),Gk.bind(null,y,E,p,u),null),Nt===null)throw Error(r(349));C||(ea&124)!==0||Hk(y,u,p)}return p}function Hk(s,u,p){s.flags|=16384,s={getSnapshot:u,value:p},u=Ze.updateQueue,u===null?(u=gg(),Ze.updateQueue=u,u.stores=[s]):(p=u.stores,p===null?u.stores=[s]:p.push(s))}function Gk(s,u,p,y){u.value=p,u.getSnapshot=y,Zk(u)&&Kk(s)}function Yk(s,u,p){return p(function(){Zk(u)&&Kk(s)})}function Zk(s){var u=s.getSnapshot;s=s.value;try{var p=u();return!Un(s,p)}catch{return!0}}function Kk(s){var u=Xs(s,2);u!==null&&Kn(u,s,2)}function _g(s){var u=Mn();if(typeof s=="function"){var p=s;if(s=p(),Qa){Te(!0);try{p()}finally{Te(!1)}}}return u.memoizedState=u.baseState=s,u.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:mi,lastRenderedState:s},u}function Xk(s,u,p,y){return s.baseState=p,bg(s,wt,typeof y=="function"?y:mi)}function W8(s,u,p,y,E){if(Nf(s))throw Error(r(485));if(s=u.action,s!==null){var C={payload:E,action:s,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(F){C.listeners.push(F)}};B.T!==null?p(!0):C.isTransition=!1,y(C),p=u.pending,p===null?(C.next=u.pending=C,Wk(u,C)):(C.next=p.next,u.pending=p.next=C)}}function Wk(s,u){var p=u.action,y=u.payload,E=s.state;if(u.isTransition){var C=B.T,F={};B.T=F;try{var Z=p(E,y),ee=B.S;ee!==null&&ee(F,Z),Qk(s,u,Z)}catch(ce){xg(s,u,ce)}finally{B.T=C}}else try{C=p(E,y),Qk(s,u,C)}catch(ce){xg(s,u,ce)}}function Qk(s,u,p){p!==null&&typeof p=="object"&&typeof p.then=="function"?p.then(function(y){Jk(s,u,y)},function(y){return xg(s,u,y)}):Jk(s,u,p)}function Jk(s,u,p){u.status="fulfilled",u.value=p,eA(u),s.state=p,u=s.pending,u!==null&&(p=u.next,p===u?s.pending=null:(p=p.next,u.next=p,Wk(s,p)))}function xg(s,u,p){var y=s.pending;if(s.pending=null,y!==null){y=y.next;do u.status="rejected",u.reason=p,eA(u),u=u.next;while(u!==y)}s.action=null}function eA(s){s=s.listeners;for(var u=0;u<s.length;u++)(0,s[u])()}function tA(s,u){return u}function nA(s,u){if(pt){var p=Nt.formState;if(p!==null){e:{var y=Ze;if(pt){if(qt){t:{for(var E=qt,C=qr;E.nodeType!==8;){if(!C){E=null;break t}if(E=Er(E.nextSibling),E===null){E=null;break t}}C=E.data,E=C==="F!"||C==="F"?E:null}if(E){qt=Er(E.nextSibling),y=E.data==="F!";break e}}Za(y)}y=!1}y&&(u=p[0])}}return p=Mn(),p.memoizedState=p.baseState=u,y={pending:null,lanes:0,dispatch:null,lastRenderedReducer:tA,lastRenderedState:u},p.queue=y,p=xA.bind(null,Ze,y),y.dispatch=p,y=_g(!1),C=Ag.bind(null,Ze,!1,y.queue),y=Mn(),E={state:u,dispatch:null,action:s,pending:null},y.queue=E,p=W8.bind(null,Ze,E,C,p),E.dispatch=p,y.memoizedState=s,[u,p,!1]}function rA(s){var u=Xt();return iA(u,wt,s)}function iA(s,u,p){if(u=bg(s,u,tA)[0],s=Tf(mi)[0],typeof u=="object"&&u!==null&&typeof u.then=="function")try{var y=Yl(u)}catch(F){throw F===Fl?xf:F}else y=u;u=Xt();var E=u.queue,C=E.dispatch;return p!==u.memoizedState&&(Ze.flags|=2048,ao(9,Cf(),Q8.bind(null,E,p),null)),[y,C,s]}function Q8(s,u){s.action=u}function aA(s){var u=Xt(),p=wt;if(p!==null)return iA(u,p,s);Xt(),u=u.memoizedState,p=Xt();var y=p.queue.dispatch;return p.memoizedState=s,[u,y,!1]}function ao(s,u,p,y){return s={tag:s,create:p,deps:y,inst:u,next:null},u=Ze.updateQueue,u===null&&(u=gg(),Ze.updateQueue=u),p=u.lastEffect,p===null?u.lastEffect=s.next=s:(y=p.next,p.next=s,s.next=y,u.lastEffect=s),s}function Cf(){return{destroy:void 0,resource:void 0}}function sA(){return Xt().memoizedState}function Of(s,u,p,y){var E=Mn();y=y===void 0?null:y,Ze.flags|=s,E.memoizedState=ao(1|u,Cf(),p,y)}function Zl(s,u,p,y){var E=Xt();y=y===void 0?null:y;var C=E.memoizedState.inst;wt!==null&&y!==null&&fg(y,wt.memoizedState.deps)?E.memoizedState=ao(u,C,p,y):(Ze.flags|=s,E.memoizedState=ao(1|u,C,p,y))}function oA(s,u){Of(8390656,8,s,u)}function lA(s,u){Zl(2048,8,s,u)}function uA(s,u){return Zl(4,2,s,u)}function cA(s,u){return Zl(4,4,s,u)}function fA(s,u){if(typeof u=="function"){s=s();var p=u(s);return function(){typeof p=="function"?p():u(null)}}if(u!=null)return s=s(),u.current=s,function(){u.current=null}}function dA(s,u,p){p=p!=null?p.concat([s]):null,Zl(4,4,fA.bind(null,u,s),p)}function wg(){}function hA(s,u){var p=Xt();u=u===void 0?null:u;var y=p.memoizedState;return u!==null&&fg(u,y[1])?y[0]:(p.memoizedState=[s,u],s)}function pA(s,u){var p=Xt();u=u===void 0?null:u;var y=p.memoizedState;if(u!==null&&fg(u,y[1]))return y[0];if(y=s(),Qa){Te(!0);try{s()}finally{Te(!1)}}return p.memoizedState=[y,u],y}function Sg(s,u,p){return p===void 0||(ea&1073741824)!==0?s.memoizedState=u:(s.memoizedState=p,s=y2(),Ze.lanes|=s,oa|=s,p)}function mA(s,u,p,y){return Un(p,u)?p:no.current!==null?(s=Sg(s,p,y),Un(s,u)||(on=!0),s):(ea&42)===0?(on=!0,s.memoizedState=p):(s=y2(),Ze.lanes|=s,oa|=s,u)}function gA(s,u,p,y,E){var C=G.p;G.p=C!==0&&8>C?C:8;var F=B.T,Z={};B.T=Z,Ag(s,!1,u,p);try{var ee=E(),ce=B.S;if(ce!==null&&ce(Z,ee),ee!==null&&typeof ee=="object"&&typeof ee.then=="function"){var ge=Z8(ee,y);Kl(s,u,ge,Zn(s))}else Kl(s,u,y,Zn(s))}catch(ve){Kl(s,u,{then:function(){},status:"rejected",reason:ve},Zn())}finally{G.p=C,B.T=F}}function J8(){}function Eg(s,u,p,y){if(s.tag!==5)throw Error(r(476));var E=yA(s).queue;gA(s,E,u,K,p===null?J8:function(){return bA(s),p(y)})}function yA(s){var u=s.memoizedState;if(u!==null)return u;u={memoizedState:K,baseState:K,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:mi,lastRenderedState:K},next:null};var p={};return u.next={memoizedState:p,baseState:p,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:mi,lastRenderedState:p},next:null},s.memoizedState=u,s=s.alternate,s!==null&&(s.memoizedState=u),u}function bA(s){var u=yA(s).next.queue;Kl(s,u,{},Zn())}function kg(){return bn(hu)}function vA(){return Xt().memoizedState}function _A(){return Xt().memoizedState}function ez(s){for(var u=s.return;u!==null;){switch(u.tag){case 24:case 3:var p=Zn();s=Qi(p);var y=Ji(u,s,p);y!==null&&(Kn(y,u,p),Ul(y,u,p)),u={cache:tg()},s.payload=u;return}u=u.return}}function tz(s,u,p){var y=Zn();p={lane:y,revertLane:0,action:p,hasEagerState:!1,eagerState:null,next:null},Nf(s)?wA(u,p):(p=Hm(s,u,p,y),p!==null&&(Kn(p,s,y),SA(p,u,y)))}function xA(s,u,p){var y=Zn();Kl(s,u,p,y)}function Kl(s,u,p,y){var E={lane:y,revertLane:0,action:p,hasEagerState:!1,eagerState:null,next:null};if(Nf(s))wA(u,E);else{var C=s.alternate;if(s.lanes===0&&(C===null||C.lanes===0)&&(C=u.lastRenderedReducer,C!==null))try{var F=u.lastRenderedState,Z=C(F,p);if(E.hasEagerState=!0,E.eagerState=Z,Un(Z,F))return hf(s,u,E,0),Nt===null&&df(),!1}catch{}finally{}if(p=Hm(s,u,E,y),p!==null)return Kn(p,s,y),SA(p,u,y),!0}return!1}function Ag(s,u,p,y){if(y={lane:2,revertLane:iy(),action:y,hasEagerState:!1,eagerState:null,next:null},Nf(s)){if(u)throw Error(r(479))}else u=Hm(s,p,y,2),u!==null&&Kn(u,s,2)}function Nf(s){var u=s.alternate;return s===Ze||u!==null&&u===Ze}function wA(s,u){ro=Ef=!0;var p=s.pending;p===null?u.next=u:(u.next=p.next,p.next=u),s.pending=u}function SA(s,u,p){if((p&4194048)!==0){var y=u.lanes;y&=s.pendingLanes,p|=y,u.lanes=p,Yc(s,p)}}var Rf={readContext:bn,use:Af,useCallback:Vt,useContext:Vt,useEffect:Vt,useImperativeHandle:Vt,useLayoutEffect:Vt,useInsertionEffect:Vt,useMemo:Vt,useReducer:Vt,useRef:Vt,useState:Vt,useDebugValue:Vt,useDeferredValue:Vt,useTransition:Vt,useSyncExternalStore:Vt,useId:Vt,useHostTransitionStatus:Vt,useFormState:Vt,useActionState:Vt,useOptimistic:Vt,useMemoCache:Vt,useCacheRefresh:Vt},EA={readContext:bn,use:Af,useCallback:function(s,u){return Mn().memoizedState=[s,u===void 0?null:u],s},useContext:bn,useEffect:oA,useImperativeHandle:function(s,u,p){p=p!=null?p.concat([s]):null,Of(4194308,4,fA.bind(null,u,s),p)},useLayoutEffect:function(s,u){return Of(4194308,4,s,u)},useInsertionEffect:function(s,u){Of(4,2,s,u)},useMemo:function(s,u){var p=Mn();u=u===void 0?null:u;var y=s();if(Qa){Te(!0);try{s()}finally{Te(!1)}}return p.memoizedState=[y,u],y},useReducer:function(s,u,p){var y=Mn();if(p!==void 0){var E=p(u);if(Qa){Te(!0);try{p(u)}finally{Te(!1)}}}else E=u;return y.memoizedState=y.baseState=E,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:s,lastRenderedState:E},y.queue=s,s=s.dispatch=tz.bind(null,Ze,s),[y.memoizedState,s]},useRef:function(s){var u=Mn();return s={current:s},u.memoizedState=s},useState:function(s){s=_g(s);var u=s.queue,p=xA.bind(null,Ze,u);return u.dispatch=p,[s.memoizedState,p]},useDebugValue:wg,useDeferredValue:function(s,u){var p=Mn();return Sg(p,s,u)},useTransition:function(){var s=_g(!1);return s=gA.bind(null,Ze,s.queue,!0,!1),Mn().memoizedState=s,[!1,s]},useSyncExternalStore:function(s,u,p){var y=Ze,E=Mn();if(pt){if(p===void 0)throw Error(r(407));p=p()}else{if(p=u(),Nt===null)throw Error(r(349));(at&124)!==0||Hk(y,u,p)}E.memoizedState=p;var C={value:p,getSnapshot:u};return E.queue=C,oA(Yk.bind(null,y,C,s),[s]),y.flags|=2048,ao(9,Cf(),Gk.bind(null,y,C,p,u),null),p},useId:function(){var s=Mn(),u=Nt.identifierPrefix;if(pt){var p=di,y=fi;p=(y&~(1<<32-je(y)-1)).toString(32)+p,u="«"+u+"R"+p,p=kf++,0<p&&(u+="H"+p.toString(32)),u+="»"}else p=K8++,u="«"+u+"r"+p.toString(32)+"»";return s.memoizedState=u},useHostTransitionStatus:kg,useFormState:nA,useActionState:nA,useOptimistic:function(s){var u=Mn();u.memoizedState=u.baseState=s;var p={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return u.queue=p,u=Ag.bind(null,Ze,!0,p),p.dispatch=u,[s,u]},useMemoCache:yg,useCacheRefresh:function(){return Mn().memoizedState=ez.bind(null,Ze)}},kA={readContext:bn,use:Af,useCallback:hA,useContext:bn,useEffect:lA,useImperativeHandle:dA,useInsertionEffect:uA,useLayoutEffect:cA,useMemo:pA,useReducer:Tf,useRef:sA,useState:function(){return Tf(mi)},useDebugValue:wg,useDeferredValue:function(s,u){var p=Xt();return mA(p,wt.memoizedState,s,u)},useTransition:function(){var s=Tf(mi)[0],u=Xt().memoizedState;return[typeof s=="boolean"?s:Yl(s),u]},useSyncExternalStore:Vk,useId:vA,useHostTransitionStatus:kg,useFormState:rA,useActionState:rA,useOptimistic:function(s,u){var p=Xt();return Xk(p,wt,s,u)},useMemoCache:yg,useCacheRefresh:_A},nz={readContext:bn,use:Af,useCallback:hA,useContext:bn,useEffect:lA,useImperativeHandle:dA,useInsertionEffect:uA,useLayoutEffect:cA,useMemo:pA,useReducer:vg,useRef:sA,useState:function(){return vg(mi)},useDebugValue:wg,useDeferredValue:function(s,u){var p=Xt();return wt===null?Sg(p,s,u):mA(p,wt.memoizedState,s,u)},useTransition:function(){var s=vg(mi)[0],u=Xt().memoizedState;return[typeof s=="boolean"?s:Yl(s),u]},useSyncExternalStore:Vk,useId:vA,useHostTransitionStatus:kg,useFormState:aA,useActionState:aA,useOptimistic:function(s,u){var p=Xt();return wt!==null?Xk(p,wt,s,u):(p.baseState=s,[s,p.queue.dispatch])},useMemoCache:yg,useCacheRefresh:_A},so=null,Xl=0;function jf(s){var u=Xl;return Xl+=1,so===null&&(so=[]),Ik(so,s,u)}function Wl(s,u){u=u.props.ref,s.ref=u!==void 0?u:null}function Mf(s,u){throw u.$$typeof===h?Error(r(525)):(s=Object.prototype.toString.call(u),Error(r(31,s==="[object Object]"?"object with keys {"+Object.keys(u).join(", ")+"}":s)))}function AA(s){var u=s._init;return u(s._payload)}function TA(s){function u(oe,ie){if(s){var ue=oe.deletions;ue===null?(oe.deletions=[ie],oe.flags|=16):ue.push(ie)}}function p(oe,ie){if(!s)return null;for(;ie!==null;)u(oe,ie),ie=ie.sibling;return null}function y(oe){for(var ie=new Map;oe!==null;)oe.key!==null?ie.set(oe.key,oe):ie.set(oe.index,oe),oe=oe.sibling;return ie}function E(oe,ie){return oe=ci(oe,ie),oe.index=0,oe.sibling=null,oe}function C(oe,ie,ue){return oe.index=ue,s?(ue=oe.alternate,ue!==null?(ue=ue.index,ue<ie?(oe.flags|=67108866,ie):ue):(oe.flags|=67108866,ie)):(oe.flags|=1048576,ie)}function F(oe){return s&&oe.alternate===null&&(oe.flags|=67108866),oe}function Z(oe,ie,ue,ye){return ie===null||ie.tag!==6?(ie=Ym(ue,oe.mode,ye),ie.return=oe,ie):(ie=E(ie,ue),ie.return=oe,ie)}function ee(oe,ie,ue,ye){var Ce=ue.type;return Ce===v?ge(oe,ie,ue.props.children,ye,ue.key):ie!==null&&(ie.elementType===Ce||typeof Ce=="object"&&Ce!==null&&Ce.$$typeof===$&&AA(Ce)===ie.type)?(ie=E(ie,ue.props),Wl(ie,ue),ie.return=oe,ie):(ie=mf(ue.type,ue.key,ue.props,null,oe.mode,ye),Wl(ie,ue),ie.return=oe,ie)}function ce(oe,ie,ue,ye){return ie===null||ie.tag!==4||ie.stateNode.containerInfo!==ue.containerInfo||ie.stateNode.implementation!==ue.implementation?(ie=Zm(ue,oe.mode,ye),ie.return=oe,ie):(ie=E(ie,ue.children||[]),ie.return=oe,ie)}function ge(oe,ie,ue,ye,Ce){return ie===null||ie.tag!==7?(ie=Va(ue,oe.mode,ye,Ce),ie.return=oe,ie):(ie=E(ie,ue),ie.return=oe,ie)}function ve(oe,ie,ue){if(typeof ie=="string"&&ie!==""||typeof ie=="number"||typeof ie=="bigint")return ie=Ym(""+ie,oe.mode,ue),ie.return=oe,ie;if(typeof ie=="object"&&ie!==null){switch(ie.$$typeof){case m:return ue=mf(ie.type,ie.key,ie.props,null,oe.mode,ue),Wl(ue,ie),ue.return=oe,ue;case g:return ie=Zm(ie,oe.mode,ue),ie.return=oe,ie;case $:var ye=ie._init;return ie=ye(ie._payload),ve(oe,ie,ue)}if(H(ie)||P(ie))return ie=Va(ie,oe.mode,ue,null),ie.return=oe,ie;if(typeof ie.then=="function")return ve(oe,jf(ie),ue);if(ie.$$typeof===x)return ve(oe,vf(oe,ie),ue);Mf(oe,ie)}return null}function de(oe,ie,ue,ye){var Ce=ie!==null?ie.key:null;if(typeof ue=="string"&&ue!==""||typeof ue=="number"||typeof ue=="bigint")return Ce!==null?null:Z(oe,ie,""+ue,ye);if(typeof ue=="object"&&ue!==null){switch(ue.$$typeof){case m:return ue.key===Ce?ee(oe,ie,ue,ye):null;case g:return ue.key===Ce?ce(oe,ie,ue,ye):null;case $:return Ce=ue._init,ue=Ce(ue._payload),de(oe,ie,ue,ye)}if(H(ue)||P(ue))return Ce!==null?null:ge(oe,ie,ue,ye,null);if(typeof ue.then=="function")return de(oe,ie,jf(ue),ye);if(ue.$$typeof===x)return de(oe,ie,vf(oe,ue),ye);Mf(oe,ue)}return null}function he(oe,ie,ue,ye,Ce){if(typeof ye=="string"&&ye!==""||typeof ye=="number"||typeof ye=="bigint")return oe=oe.get(ue)||null,Z(ie,oe,""+ye,Ce);if(typeof ye=="object"&&ye!==null){switch(ye.$$typeof){case m:return oe=oe.get(ye.key===null?ue:ye.key)||null,ee(ie,oe,ye,Ce);case g:return oe=oe.get(ye.key===null?ue:ye.key)||null,ce(ie,oe,ye,Ce);case $:var Qe=ye._init;return ye=Qe(ye._payload),he(oe,ie,ue,ye,Ce)}if(H(ye)||P(ye))return oe=oe.get(ue)||null,ge(ie,oe,ye,Ce,null);if(typeof ye.then=="function")return he(oe,ie,ue,jf(ye),Ce);if(ye.$$typeof===x)return he(oe,ie,ue,vf(ie,ye),Ce);Mf(ie,ye)}return null}function Fe(oe,ie,ue,ye){for(var Ce=null,Qe=null,Me=ie,ze=ie=0,un=null;Me!==null&&ze<ue.length;ze++){Me.index>ze?(un=Me,Me=null):un=Me.sibling;var ft=de(oe,Me,ue[ze],ye);if(ft===null){Me===null&&(Me=un);break}s&&Me&&ft.alternate===null&&u(oe,Me),ie=C(ft,ie,ze),Qe===null?Ce=ft:Qe.sibling=ft,Qe=ft,Me=un}if(ze===ue.length)return p(oe,Me),pt&&Ga(oe,ze),Ce;if(Me===null){for(;ze<ue.length;ze++)Me=ve(oe,ue[ze],ye),Me!==null&&(ie=C(Me,ie,ze),Qe===null?Ce=Me:Qe.sibling=Me,Qe=Me);return pt&&Ga(oe,ze),Ce}for(Me=y(Me);ze<ue.length;ze++)un=he(Me,oe,ze,ue[ze],ye),un!==null&&(s&&un.alternate!==null&&Me.delete(un.key===null?ze:un.key),ie=C(un,ie,ze),Qe===null?Ce=un:Qe.sibling=un,Qe=un);return s&&Me.forEach(function(ga){return u(oe,ga)}),pt&&Ga(oe,ze),Ce}function Le(oe,ie,ue,ye){if(ue==null)throw Error(r(151));for(var Ce=null,Qe=null,Me=ie,ze=ie=0,un=null,ft=ue.next();Me!==null&&!ft.done;ze++,ft=ue.next()){Me.index>ze?(un=Me,Me=null):un=Me.sibling;var ga=de(oe,Me,ft.value,ye);if(ga===null){Me===null&&(Me=un);break}s&&Me&&ga.alternate===null&&u(oe,Me),ie=C(ga,ie,ze),Qe===null?Ce=ga:Qe.sibling=ga,Qe=ga,Me=un}if(ft.done)return p(oe,Me),pt&&Ga(oe,ze),Ce;if(Me===null){for(;!ft.done;ze++,ft=ue.next())ft=ve(oe,ft.value,ye),ft!==null&&(ie=C(ft,ie,ze),Qe===null?Ce=ft:Qe.sibling=ft,Qe=ft);return pt&&Ga(oe,ze),Ce}for(Me=y(Me);!ft.done;ze++,ft=ue.next())ft=he(Me,oe,ze,ft.value,ye),ft!==null&&(s&&ft.alternate!==null&&Me.delete(ft.key===null?ze:ft.key),ie=C(ft,ie,ze),Qe===null?Ce=ft:Qe.sibling=ft,Qe=ft);return s&&Me.forEach(function(rq){return u(oe,rq)}),pt&&Ga(oe,ze),Ce}function Et(oe,ie,ue,ye){if(typeof ue=="object"&&ue!==null&&ue.type===v&&ue.key===null&&(ue=ue.props.children),typeof ue=="object"&&ue!==null){switch(ue.$$typeof){case m:e:{for(var Ce=ue.key;ie!==null;){if(ie.key===Ce){if(Ce=ue.type,Ce===v){if(ie.tag===7){p(oe,ie.sibling),ye=E(ie,ue.props.children),ye.return=oe,oe=ye;break e}}else if(ie.elementType===Ce||typeof Ce=="object"&&Ce!==null&&Ce.$$typeof===$&&AA(Ce)===ie.type){p(oe,ie.sibling),ye=E(ie,ue.props),Wl(ye,ue),ye.return=oe,oe=ye;break e}p(oe,ie);break}else u(oe,ie);ie=ie.sibling}ue.type===v?(ye=Va(ue.props.children,oe.mode,ye,ue.key),ye.return=oe,oe=ye):(ye=mf(ue.type,ue.key,ue.props,null,oe.mode,ye),Wl(ye,ue),ye.return=oe,oe=ye)}return F(oe);case g:e:{for(Ce=ue.key;ie!==null;){if(ie.key===Ce)if(ie.tag===4&&ie.stateNode.containerInfo===ue.containerInfo&&ie.stateNode.implementation===ue.implementation){p(oe,ie.sibling),ye=E(ie,ue.children||[]),ye.return=oe,oe=ye;break e}else{p(oe,ie);break}else u(oe,ie);ie=ie.sibling}ye=Zm(ue,oe.mode,ye),ye.return=oe,oe=ye}return F(oe);case $:return Ce=ue._init,ue=Ce(ue._payload),Et(oe,ie,ue,ye)}if(H(ue))return Fe(oe,ie,ue,ye);if(P(ue)){if(Ce=P(ue),typeof Ce!="function")throw Error(r(150));return ue=Ce.call(ue),Le(oe,ie,ue,ye)}if(typeof ue.then=="function")return Et(oe,ie,jf(ue),ye);if(ue.$$typeof===x)return Et(oe,ie,vf(oe,ue),ye);Mf(oe,ue)}return typeof ue=="string"&&ue!==""||typeof ue=="number"||typeof ue=="bigint"?(ue=""+ue,ie!==null&&ie.tag===6?(p(oe,ie.sibling),ye=E(ie,ue),ye.return=oe,oe=ye):(p(oe,ie),ye=Ym(ue,oe.mode,ye),ye.return=oe,oe=ye),F(oe)):p(oe,ie)}return function(oe,ie,ue,ye){try{Xl=0;var Ce=Et(oe,ie,ue,ye);return so=null,Ce}catch(Me){if(Me===Fl||Me===xf)throw Me;var Qe=Vn(29,Me,null,oe.mode);return Qe.lanes=ye,Qe.return=oe,Qe}finally{}}}var oo=TA(!0),CA=TA(!1),hr=V(null),Fr=null;function ta(s){var u=s.alternate;j(nn,nn.current&1),j(hr,s),Fr===null&&(u===null||no.current!==null||u.memoizedState!==null)&&(Fr=s)}function OA(s){if(s.tag===22){if(j(nn,nn.current),j(hr,s),Fr===null){var u=s.alternate;u!==null&&u.memoizedState!==null&&(Fr=s)}}else na()}function na(){j(nn,nn.current),j(hr,hr.current)}function gi(s){X(hr),Fr===s&&(Fr=null),X(nn)}var nn=V(0);function $f(s){for(var u=s;u!==null;){if(u.tag===13){var p=u.memoizedState;if(p!==null&&(p=p.dehydrated,p===null||p.data==="$?"||gy(p)))return u}else if(u.tag===19&&u.memoizedProps.revealOrder!==void 0){if((u.flags&128)!==0)return u}else if(u.child!==null){u.child.return=u,u=u.child;continue}if(u===s)break;for(;u.sibling===null;){if(u.return===null||u.return===s)return null;u=u.return}u.sibling.return=u.return,u=u.sibling}return null}function Tg(s,u,p,y){u=s.memoizedState,p=p(y,u),p=p==null?u:d({},u,p),s.memoizedState=p,s.lanes===0&&(s.updateQueue.baseState=p)}var Cg={enqueueSetState:function(s,u,p){s=s._reactInternals;var y=Zn(),E=Qi(y);E.payload=u,p!=null&&(E.callback=p),u=Ji(s,E,y),u!==null&&(Kn(u,s,y),Ul(u,s,y))},enqueueReplaceState:function(s,u,p){s=s._reactInternals;var y=Zn(),E=Qi(y);E.tag=1,E.payload=u,p!=null&&(E.callback=p),u=Ji(s,E,y),u!==null&&(Kn(u,s,y),Ul(u,s,y))},enqueueForceUpdate:function(s,u){s=s._reactInternals;var p=Zn(),y=Qi(p);y.tag=2,u!=null&&(y.callback=u),u=Ji(s,y,p),u!==null&&(Kn(u,s,p),Ul(u,s,p))}};function NA(s,u,p,y,E,C,F){return s=s.stateNode,typeof s.shouldComponentUpdate=="function"?s.shouldComponentUpdate(y,C,F):u.prototype&&u.prototype.isPureReactComponent?!Ml(p,y)||!Ml(E,C):!0}function RA(s,u,p,y){s=u.state,typeof u.componentWillReceiveProps=="function"&&u.componentWillReceiveProps(p,y),typeof u.UNSAFE_componentWillReceiveProps=="function"&&u.UNSAFE_componentWillReceiveProps(p,y),u.state!==s&&Cg.enqueueReplaceState(u,u.state,null)}function Ja(s,u){var p=u;if("ref"in u){p={};for(var y in u)y!=="ref"&&(p[y]=u[y])}if(s=s.defaultProps){p===u&&(p=d({},p));for(var E in s)p[E]===void 0&&(p[E]=s[E])}return p}var Df=typeof reportError=="function"?reportError:function(s){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var u=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof s=="object"&&s!==null&&typeof s.message=="string"?String(s.message):String(s),error:s});if(!window.dispatchEvent(u))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",s);return}console.error(s)};function jA(s){Df(s)}function MA(s){console.error(s)}function $A(s){Df(s)}function If(s,u){try{var p=s.onUncaughtError;p(u.value,{componentStack:u.stack})}catch(y){setTimeout(function(){throw y})}}function DA(s,u,p){try{var y=s.onCaughtError;y(p.value,{componentStack:p.stack,errorBoundary:u.tag===1?u.stateNode:null})}catch(E){setTimeout(function(){throw E})}}function Og(s,u,p){return p=Qi(p),p.tag=3,p.payload={element:null},p.callback=function(){If(s,u)},p}function IA(s){return s=Qi(s),s.tag=3,s}function PA(s,u,p,y){var E=p.type.getDerivedStateFromError;if(typeof E=="function"){var C=y.value;s.payload=function(){return E(C)},s.callback=function(){DA(u,p,y)}}var F=p.stateNode;F!==null&&typeof F.componentDidCatch=="function"&&(s.callback=function(){DA(u,p,y),typeof E!="function"&&(la===null?la=new Set([this]):la.add(this));var Z=y.stack;this.componentDidCatch(y.value,{componentStack:Z!==null?Z:""})})}function rz(s,u,p,y,E){if(p.flags|=32768,y!==null&&typeof y=="object"&&typeof y.then=="function"){if(u=p.alternate,u!==null&&Ll(u,p,E,!0),p=hr.current,p!==null){switch(p.tag){case 13:return Fr===null?Jg():p.alternate===null&&Ft===0&&(Ft=3),p.flags&=-257,p.flags|=65536,p.lanes=E,y===ig?p.flags|=16384:(u=p.updateQueue,u===null?p.updateQueue=new Set([y]):u.add(y),ty(s,y,E)),!1;case 22:return p.flags|=65536,y===ig?p.flags|=16384:(u=p.updateQueue,u===null?(u={transitions:null,markerInstances:null,retryQueue:new Set([y])},p.updateQueue=u):(p=u.retryQueue,p===null?u.retryQueue=new Set([y]):p.add(y)),ty(s,y,E)),!1}throw Error(r(435,p.tag))}return ty(s,y,E),Jg(),!1}if(pt)return u=hr.current,u!==null?((u.flags&65536)===0&&(u.flags|=256),u.flags|=65536,u.lanes=E,y!==Wm&&(s=Error(r(422),{cause:y}),Pl(ur(s,p)))):(y!==Wm&&(u=Error(r(423),{cause:y}),Pl(ur(u,p))),s=s.current.alternate,s.flags|=65536,E&=-E,s.lanes|=E,y=ur(y,p),E=Og(s.stateNode,y,E),og(s,E),Ft!==4&&(Ft=2)),!1;var C=Error(r(520),{cause:y});if(C=ur(C,p),iu===null?iu=[C]:iu.push(C),Ft!==4&&(Ft=2),u===null)return!0;y=ur(y,p),p=u;do{switch(p.tag){case 3:return p.flags|=65536,s=E&-E,p.lanes|=s,s=Og(p.stateNode,y,s),og(p,s),!1;case 1:if(u=p.type,C=p.stateNode,(p.flags&128)===0&&(typeof u.getDerivedStateFromError=="function"||C!==null&&typeof C.componentDidCatch=="function"&&(la===null||!la.has(C))))return p.flags|=65536,E&=-E,p.lanes|=E,E=IA(E),PA(E,s,p,y),og(p,E),!1}p=p.return}while(p!==null);return!1}var LA=Error(r(461)),on=!1;function fn(s,u,p,y){u.child=s===null?CA(u,null,p,y):oo(u,s.child,p,y)}function zA(s,u,p,y,E){p=p.render;var C=u.ref;if("ref"in y){var F={};for(var Z in y)Z!=="ref"&&(F[Z]=y[Z])}else F=y;return Xa(u),y=dg(s,u,p,F,C,E),Z=hg(),s!==null&&!on?(pg(s,u,E),yi(s,u,E)):(pt&&Z&&Km(u),u.flags|=1,fn(s,u,y,E),u.child)}function qA(s,u,p,y,E){if(s===null){var C=p.type;return typeof C=="function"&&!Gm(C)&&C.defaultProps===void 0&&p.compare===null?(u.tag=15,u.type=C,FA(s,u,C,y,E)):(s=mf(p.type,null,y,u,u.mode,E),s.ref=u.ref,s.return=u,u.child=s)}if(C=s.child,!Pg(s,E)){var F=C.memoizedProps;if(p=p.compare,p=p!==null?p:Ml,p(F,y)&&s.ref===u.ref)return yi(s,u,E)}return u.flags|=1,s=ci(C,y),s.ref=u.ref,s.return=u,u.child=s}function FA(s,u,p,y,E){if(s!==null){var C=s.memoizedProps;if(Ml(C,y)&&s.ref===u.ref)if(on=!1,u.pendingProps=y=C,Pg(s,E))(s.flags&131072)!==0&&(on=!0);else return u.lanes=s.lanes,yi(s,u,E)}return Ng(s,u,p,y,E)}function BA(s,u,p){var y=u.pendingProps,E=y.children,C=s!==null?s.memoizedState:null;if(y.mode==="hidden"){if((u.flags&128)!==0){if(y=C!==null?C.baseLanes|p:p,s!==null){for(E=u.child=s.child,C=0;E!==null;)C=C|E.lanes|E.childLanes,E=E.sibling;u.childLanes=C&~y}else u.childLanes=0,u.child=null;return UA(s,u,y,p)}if((p&536870912)!==0)u.memoizedState={baseLanes:0,cachePool:null},s!==null&&_f(u,C!==null?C.cachePool:null),C!==null?Fk(u,C):ug(),OA(u);else return u.lanes=u.childLanes=536870912,UA(s,u,C!==null?C.baseLanes|p:p,p)}else C!==null?(_f(u,C.cachePool),Fk(u,C),na(),u.memoizedState=null):(s!==null&&_f(u,null),ug(),na());return fn(s,u,E,p),u.child}function UA(s,u,p,y){var E=rg();return E=E===null?null:{parent:tn._currentValue,pool:E},u.memoizedState={baseLanes:p,cachePool:E},s!==null&&_f(u,null),ug(),OA(u),s!==null&&Ll(s,u,y,!0),null}function Pf(s,u){var p=u.ref;if(p===null)s!==null&&s.ref!==null&&(u.flags|=4194816);else{if(typeof p!="function"&&typeof p!="object")throw Error(r(284));(s===null||s.ref!==p)&&(u.flags|=4194816)}}function Ng(s,u,p,y,E){return Xa(u),p=dg(s,u,p,y,void 0,E),y=hg(),s!==null&&!on?(pg(s,u,E),yi(s,u,E)):(pt&&y&&Km(u),u.flags|=1,fn(s,u,p,E),u.child)}function VA(s,u,p,y,E,C){return Xa(u),u.updateQueue=null,p=Uk(u,y,p,E),Bk(s),y=hg(),s!==null&&!on?(pg(s,u,C),yi(s,u,C)):(pt&&y&&Km(u),u.flags|=1,fn(s,u,p,C),u.child)}function HA(s,u,p,y,E){if(Xa(u),u.stateNode===null){var C=Ws,F=p.contextType;typeof F=="object"&&F!==null&&(C=bn(F)),C=new p(y,C),u.memoizedState=C.state!==null&&C.state!==void 0?C.state:null,C.updater=Cg,u.stateNode=C,C._reactInternals=u,C=u.stateNode,C.props=y,C.state=u.memoizedState,C.refs={},ag(u),F=p.contextType,C.context=typeof F=="object"&&F!==null?bn(F):Ws,C.state=u.memoizedState,F=p.getDerivedStateFromProps,typeof F=="function"&&(Tg(u,p,F,y),C.state=u.memoizedState),typeof p.getDerivedStateFromProps=="function"||typeof C.getSnapshotBeforeUpdate=="function"||typeof C.UNSAFE_componentWillMount!="function"&&typeof C.componentWillMount!="function"||(F=C.state,typeof C.componentWillMount=="function"&&C.componentWillMount(),typeof C.UNSAFE_componentWillMount=="function"&&C.UNSAFE_componentWillMount(),F!==C.state&&Cg.enqueueReplaceState(C,C.state,null),Hl(u,y,C,E),Vl(),C.state=u.memoizedState),typeof C.componentDidMount=="function"&&(u.flags|=4194308),y=!0}else if(s===null){C=u.stateNode;var Z=u.memoizedProps,ee=Ja(p,Z);C.props=ee;var ce=C.context,ge=p.contextType;F=Ws,typeof ge=="object"&&ge!==null&&(F=bn(ge));var ve=p.getDerivedStateFromProps;ge=typeof ve=="function"||typeof C.getSnapshotBeforeUpdate=="function",Z=u.pendingProps!==Z,ge||typeof C.UNSAFE_componentWillReceiveProps!="function"&&typeof C.componentWillReceiveProps!="function"||(Z||ce!==F)&&RA(u,C,y,F),Wi=!1;var de=u.memoizedState;C.state=de,Hl(u,y,C,E),Vl(),ce=u.memoizedState,Z||de!==ce||Wi?(typeof ve=="function"&&(Tg(u,p,ve,y),ce=u.memoizedState),(ee=Wi||NA(u,p,ee,y,de,ce,F))?(ge||typeof C.UNSAFE_componentWillMount!="function"&&typeof C.componentWillMount!="function"||(typeof C.componentWillMount=="function"&&C.componentWillMount(),typeof C.UNSAFE_componentWillMount=="function"&&C.UNSAFE_componentWillMount()),typeof C.componentDidMount=="function"&&(u.flags|=4194308)):(typeof C.componentDidMount=="function"&&(u.flags|=4194308),u.memoizedProps=y,u.memoizedState=ce),C.props=y,C.state=ce,C.context=F,y=ee):(typeof C.componentDidMount=="function"&&(u.flags|=4194308),y=!1)}else{C=u.stateNode,sg(s,u),F=u.memoizedProps,ge=Ja(p,F),C.props=ge,ve=u.pendingProps,de=C.context,ce=p.contextType,ee=Ws,typeof ce=="object"&&ce!==null&&(ee=bn(ce)),Z=p.getDerivedStateFromProps,(ce=typeof Z=="function"||typeof C.getSnapshotBeforeUpdate=="function")||typeof C.UNSAFE_componentWillReceiveProps!="function"&&typeof C.componentWillReceiveProps!="function"||(F!==ve||de!==ee)&&RA(u,C,y,ee),Wi=!1,de=u.memoizedState,C.state=de,Hl(u,y,C,E),Vl();var he=u.memoizedState;F!==ve||de!==he||Wi||s!==null&&s.dependencies!==null&&bf(s.dependencies)?(typeof Z=="function"&&(Tg(u,p,Z,y),he=u.memoizedState),(ge=Wi||NA(u,p,ge,y,de,he,ee)||s!==null&&s.dependencies!==null&&bf(s.dependencies))?(ce||typeof C.UNSAFE_componentWillUpdate!="function"&&typeof C.componentWillUpdate!="function"||(typeof C.componentWillUpdate=="function"&&C.componentWillUpdate(y,he,ee),typeof C.UNSAFE_componentWillUpdate=="function"&&C.UNSAFE_componentWillUpdate(y,he,ee)),typeof C.componentDidUpdate=="function"&&(u.flags|=4),typeof C.getSnapshotBeforeUpdate=="function"&&(u.flags|=1024)):(typeof C.componentDidUpdate!="function"||F===s.memoizedProps&&de===s.memoizedState||(u.flags|=4),typeof C.getSnapshotBeforeUpdate!="function"||F===s.memoizedProps&&de===s.memoizedState||(u.flags|=1024),u.memoizedProps=y,u.memoizedState=he),C.props=y,C.state=he,C.context=ee,y=ge):(typeof C.componentDidUpdate!="function"||F===s.memoizedProps&&de===s.memoizedState||(u.flags|=4),typeof C.getSnapshotBeforeUpdate!="function"||F===s.memoizedProps&&de===s.memoizedState||(u.flags|=1024),y=!1)}return C=y,Pf(s,u),y=(u.flags&128)!==0,C||y?(C=u.stateNode,p=y&&typeof p.getDerivedStateFromError!="function"?null:C.render(),u.flags|=1,s!==null&&y?(u.child=oo(u,s.child,null,E),u.child=oo(u,null,p,E)):fn(s,u,p,E),u.memoizedState=C.state,s=u.child):s=yi(s,u,E),s}function GA(s,u,p,y){return Il(),u.flags|=256,fn(s,u,p,y),u.child}var Rg={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function jg(s){return{baseLanes:s,cachePool:Mk()}}function Mg(s,u,p){return s=s!==null?s.childLanes&~p:0,u&&(s|=pr),s}function YA(s,u,p){var y=u.pendingProps,E=!1,C=(u.flags&128)!==0,F;if((F=C)||(F=s!==null&&s.memoizedState===null?!1:(nn.current&2)!==0),F&&(E=!0,u.flags&=-129),F=(u.flags&32)!==0,u.flags&=-33,s===null){if(pt){if(E?ta(u):na(),pt){var Z=qt,ee;if(ee=Z){e:{for(ee=Z,Z=qr;ee.nodeType!==8;){if(!Z){Z=null;break e}if(ee=Er(ee.nextSibling),ee===null){Z=null;break e}}Z=ee}Z!==null?(u.memoizedState={dehydrated:Z,treeContext:Ha!==null?{id:fi,overflow:di}:null,retryLane:536870912,hydrationErrors:null},ee=Vn(18,null,null,0),ee.stateNode=Z,ee.return=u,u.child=ee,Sn=u,qt=null,ee=!0):ee=!1}ee||Za(u)}if(Z=u.memoizedState,Z!==null&&(Z=Z.dehydrated,Z!==null))return gy(Z)?u.lanes=32:u.lanes=536870912,null;gi(u)}return Z=y.children,y=y.fallback,E?(na(),E=u.mode,Z=Lf({mode:"hidden",children:Z},E),y=Va(y,E,p,null),Z.return=u,y.return=u,Z.sibling=y,u.child=Z,E=u.child,E.memoizedState=jg(p),E.childLanes=Mg(s,F,p),u.memoizedState=Rg,y):(ta(u),$g(u,Z))}if(ee=s.memoizedState,ee!==null&&(Z=ee.dehydrated,Z!==null)){if(C)u.flags&256?(ta(u),u.flags&=-257,u=Dg(s,u,p)):u.memoizedState!==null?(na(),u.child=s.child,u.flags|=128,u=null):(na(),E=y.fallback,Z=u.mode,y=Lf({mode:"visible",children:y.children},Z),E=Va(E,Z,p,null),E.flags|=2,y.return=u,E.return=u,y.sibling=E,u.child=y,oo(u,s.child,null,p),y=u.child,y.memoizedState=jg(p),y.childLanes=Mg(s,F,p),u.memoizedState=Rg,u=E);else if(ta(u),gy(Z)){if(F=Z.nextSibling&&Z.nextSibling.dataset,F)var ce=F.dgst;F=ce,y=Error(r(419)),y.stack="",y.digest=F,Pl({value:y,source:null,stack:null}),u=Dg(s,u,p)}else if(on||Ll(s,u,p,!1),F=(p&s.childLanes)!==0,on||F){if(F=Nt,F!==null&&(y=p&-p,y=(y&42)!==0?1:bl(y),y=(y&(F.suspendedLanes|p))!==0?0:y,y!==0&&y!==ee.retryLane))throw ee.retryLane=y,Xs(s,y),Kn(F,s,y),LA;Z.data==="$?"||Jg(),u=Dg(s,u,p)}else Z.data==="$?"?(u.flags|=192,u.child=s.child,u=null):(s=ee.treeContext,qt=Er(Z.nextSibling),Sn=u,pt=!0,Ya=null,qr=!1,s!==null&&(fr[dr++]=fi,fr[dr++]=di,fr[dr++]=Ha,fi=s.id,di=s.overflow,Ha=u),u=$g(u,y.children),u.flags|=4096);return u}return E?(na(),E=y.fallback,Z=u.mode,ee=s.child,ce=ee.sibling,y=ci(ee,{mode:"hidden",children:y.children}),y.subtreeFlags=ee.subtreeFlags&65011712,ce!==null?E=ci(ce,E):(E=Va(E,Z,p,null),E.flags|=2),E.return=u,y.return=u,y.sibling=E,u.child=y,y=E,E=u.child,Z=s.child.memoizedState,Z===null?Z=jg(p):(ee=Z.cachePool,ee!==null?(ce=tn._currentValue,ee=ee.parent!==ce?{parent:ce,pool:ce}:ee):ee=Mk(),Z={baseLanes:Z.baseLanes|p,cachePool:ee}),E.memoizedState=Z,E.childLanes=Mg(s,F,p),u.memoizedState=Rg,y):(ta(u),p=s.child,s=p.sibling,p=ci(p,{mode:"visible",children:y.children}),p.return=u,p.sibling=null,s!==null&&(F=u.deletions,F===null?(u.deletions=[s],u.flags|=16):F.push(s)),u.child=p,u.memoizedState=null,p)}function $g(s,u){return u=Lf({mode:"visible",children:u},s.mode),u.return=s,s.child=u}function Lf(s,u){return s=Vn(22,s,null,u),s.lanes=0,s.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null},s}function Dg(s,u,p){return oo(u,s.child,null,p),s=$g(u,u.pendingProps.children),s.flags|=2,u.memoizedState=null,s}function ZA(s,u,p){s.lanes|=u;var y=s.alternate;y!==null&&(y.lanes|=u),Jm(s.return,u,p)}function Ig(s,u,p,y,E){var C=s.memoizedState;C===null?s.memoizedState={isBackwards:u,rendering:null,renderingStartTime:0,last:y,tail:p,tailMode:E}:(C.isBackwards=u,C.rendering=null,C.renderingStartTime=0,C.last=y,C.tail=p,C.tailMode=E)}function KA(s,u,p){var y=u.pendingProps,E=y.revealOrder,C=y.tail;if(fn(s,u,y.children,p),y=nn.current,(y&2)!==0)y=y&1|2,u.flags|=128;else{if(s!==null&&(s.flags&128)!==0)e:for(s=u.child;s!==null;){if(s.tag===13)s.memoizedState!==null&&ZA(s,p,u);else if(s.tag===19)ZA(s,p,u);else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===u)break e;for(;s.sibling===null;){if(s.return===null||s.return===u)break e;s=s.return}s.sibling.return=s.return,s=s.sibling}y&=1}switch(j(nn,y),E){case"forwards":for(p=u.child,E=null;p!==null;)s=p.alternate,s!==null&&$f(s)===null&&(E=p),p=p.sibling;p=E,p===null?(E=u.child,u.child=null):(E=p.sibling,p.sibling=null),Ig(u,!1,E,p,C);break;case"backwards":for(p=null,E=u.child,u.child=null;E!==null;){if(s=E.alternate,s!==null&&$f(s)===null){u.child=E;break}s=E.sibling,E.sibling=p,p=E,E=s}Ig(u,!0,p,null,C);break;case"together":Ig(u,!1,null,null,void 0);break;default:u.memoizedState=null}return u.child}function yi(s,u,p){if(s!==null&&(u.dependencies=s.dependencies),oa|=u.lanes,(p&u.childLanes)===0)if(s!==null){if(Ll(s,u,p,!1),(p&u.childLanes)===0)return null}else return null;if(s!==null&&u.child!==s.child)throw Error(r(153));if(u.child!==null){for(s=u.child,p=ci(s,s.pendingProps),u.child=p,p.return=u;s.sibling!==null;)s=s.sibling,p=p.sibling=ci(s,s.pendingProps),p.return=u;p.sibling=null}return u.child}function Pg(s,u){return(s.lanes&u)!==0?!0:(s=s.dependencies,!!(s!==null&&bf(s)))}function iz(s,u,p){switch(u.tag){case 3:ae(u,u.stateNode.containerInfo),Xi(u,tn,s.memoizedState.cache),Il();break;case 27:case 5:le(u);break;case 4:ae(u,u.stateNode.containerInfo);break;case 10:Xi(u,u.type,u.memoizedProps.value);break;case 13:var y=u.memoizedState;if(y!==null)return y.dehydrated!==null?(ta(u),u.flags|=128,null):(p&u.child.childLanes)!==0?YA(s,u,p):(ta(u),s=yi(s,u,p),s!==null?s.sibling:null);ta(u);break;case 19:var E=(s.flags&128)!==0;if(y=(p&u.childLanes)!==0,y||(Ll(s,u,p,!1),y=(p&u.childLanes)!==0),E){if(y)return KA(s,u,p);u.flags|=128}if(E=u.memoizedState,E!==null&&(E.rendering=null,E.tail=null,E.lastEffect=null),j(nn,nn.current),y)break;return null;case 22:case 23:return u.lanes=0,BA(s,u,p);case 24:Xi(u,tn,s.memoizedState.cache)}return yi(s,u,p)}function XA(s,u,p){if(s!==null)if(s.memoizedProps!==u.pendingProps)on=!0;else{if(!Pg(s,p)&&(u.flags&128)===0)return on=!1,iz(s,u,p);on=(s.flags&131072)!==0}else on=!1,pt&&(u.flags&1048576)!==0&&Ak(u,yf,u.index);switch(u.lanes=0,u.tag){case 16:e:{s=u.pendingProps;var y=u.elementType,E=y._init;if(y=E(y._payload),u.type=y,typeof y=="function")Gm(y)?(s=Ja(y,s),u.tag=1,u=HA(null,u,y,s,p)):(u.tag=0,u=Ng(null,u,y,s,p));else{if(y!=null){if(E=y.$$typeof,E===A){u.tag=11,u=zA(null,u,y,s,p);break e}else if(E===O){u.tag=14,u=qA(null,u,y,s,p);break e}}throw u=D(y)||y,Error(r(306,u,""))}}return u;case 0:return Ng(s,u,u.type,u.pendingProps,p);case 1:return y=u.type,E=Ja(y,u.pendingProps),HA(s,u,y,E,p);case 3:e:{if(ae(u,u.stateNode.containerInfo),s===null)throw Error(r(387));y=u.pendingProps;var C=u.memoizedState;E=C.element,sg(s,u),Hl(u,y,null,p);var F=u.memoizedState;if(y=F.cache,Xi(u,tn,y),y!==C.cache&&eg(u,[tn],p,!0),Vl(),y=F.element,C.isDehydrated)if(C={element:y,isDehydrated:!1,cache:F.cache},u.updateQueue.baseState=C,u.memoizedState=C,u.flags&256){u=GA(s,u,y,p);break e}else if(y!==E){E=ur(Error(r(424)),u),Pl(E),u=GA(s,u,y,p);break e}else{switch(s=u.stateNode.containerInfo,s.nodeType){case 9:s=s.body;break;default:s=s.nodeName==="HTML"?s.ownerDocument.body:s}for(qt=Er(s.firstChild),Sn=u,pt=!0,Ya=null,qr=!0,p=CA(u,null,y,p),u.child=p;p;)p.flags=p.flags&-3|4096,p=p.sibling}else{if(Il(),y===E){u=yi(s,u,p);break e}fn(s,u,y,p)}u=u.child}return u;case 26:return Pf(s,u),s===null?(p=eT(u.type,null,u.pendingProps,null))?u.memoizedState=p:pt||(p=u.type,s=u.pendingProps,y=Qf(Y.current).createElement(p),y[sn]=u,y[yn]=s,hn(y,p,s),Zt(y),u.stateNode=y):u.memoizedState=eT(u.type,s.memoizedProps,u.pendingProps,s.memoizedState),null;case 27:return le(u),s===null&&pt&&(y=u.stateNode=W2(u.type,u.pendingProps,Y.current),Sn=u,qr=!0,E=qt,fa(u.type)?(yy=E,qt=Er(y.firstChild)):qt=E),fn(s,u,u.pendingProps.children,p),Pf(s,u),s===null&&(u.flags|=4194304),u.child;case 5:return s===null&&pt&&((E=y=qt)&&(y=jz(y,u.type,u.pendingProps,qr),y!==null?(u.stateNode=y,Sn=u,qt=Er(y.firstChild),qr=!1,E=!0):E=!1),E||Za(u)),le(u),E=u.type,C=u.pendingProps,F=s!==null?s.memoizedProps:null,y=C.children,hy(E,C)?y=null:F!==null&&hy(E,F)&&(u.flags|=32),u.memoizedState!==null&&(E=dg(s,u,X8,null,null,p),hu._currentValue=E),Pf(s,u),fn(s,u,y,p),u.child;case 6:return s===null&&pt&&((s=p=qt)&&(p=Mz(p,u.pendingProps,qr),p!==null?(u.stateNode=p,Sn=u,qt=null,s=!0):s=!1),s||Za(u)),null;case 13:return YA(s,u,p);case 4:return ae(u,u.stateNode.containerInfo),y=u.pendingProps,s===null?u.child=oo(u,null,y,p):fn(s,u,y,p),u.child;case 11:return zA(s,u,u.type,u.pendingProps,p);case 7:return fn(s,u,u.pendingProps,p),u.child;case 8:return fn(s,u,u.pendingProps.children,p),u.child;case 12:return fn(s,u,u.pendingProps.children,p),u.child;case 10:return y=u.pendingProps,Xi(u,u.type,y.value),fn(s,u,y.children,p),u.child;case 9:return E=u.type._context,y=u.pendingProps.children,Xa(u),E=bn(E),y=y(E),u.flags|=1,fn(s,u,y,p),u.child;case 14:return qA(s,u,u.type,u.pendingProps,p);case 15:return FA(s,u,u.type,u.pendingProps,p);case 19:return KA(s,u,p);case 31:return y=u.pendingProps,p=u.mode,y={mode:y.mode,children:y.children},s===null?(p=Lf(y,p),p.ref=u.ref,u.child=p,p.return=u,u=p):(p=ci(s.child,y),p.ref=u.ref,u.child=p,p.return=u,u=p),u;case 22:return BA(s,u,p);case 24:return Xa(u),y=bn(tn),s===null?(E=rg(),E===null&&(E=Nt,C=tg(),E.pooledCache=C,C.refCount++,C!==null&&(E.pooledCacheLanes|=p),E=C),u.memoizedState={parent:y,cache:E},ag(u),Xi(u,tn,E)):((s.lanes&p)!==0&&(sg(s,u),Hl(u,null,null,p),Vl()),E=s.memoizedState,C=u.memoizedState,E.parent!==y?(E={parent:y,cache:y},u.memoizedState=E,u.lanes===0&&(u.memoizedState=u.updateQueue.baseState=E),Xi(u,tn,y)):(y=C.cache,Xi(u,tn,y),y!==E.cache&&eg(u,[tn],p,!0))),fn(s,u,u.pendingProps.children,p),u.child;case 29:throw u.pendingProps}throw Error(r(156,u.tag))}function bi(s){s.flags|=4}function WA(s,u){if(u.type!=="stylesheet"||(u.state.loading&4)!==0)s.flags&=-16777217;else if(s.flags|=16777216,!aT(u)){if(u=hr.current,u!==null&&((at&4194048)===at?Fr!==null:(at&62914560)!==at&&(at&536870912)===0||u!==Fr))throw Bl=ig,$k;s.flags|=8192}}function zf(s,u){u!==null&&(s.flags|=4),s.flags&16384&&(u=s.tag!==22?Gc():536870912,s.lanes|=u,fo|=u)}function Ql(s,u){if(!pt)switch(s.tailMode){case"hidden":u=s.tail;for(var p=null;u!==null;)u.alternate!==null&&(p=u),u=u.sibling;p===null?s.tail=null:p.sibling=null;break;case"collapsed":p=s.tail;for(var y=null;p!==null;)p.alternate!==null&&(y=p),p=p.sibling;y===null?u||s.tail===null?s.tail=null:s.tail.sibling=null:y.sibling=null}}function zt(s){var u=s.alternate!==null&&s.alternate.child===s.child,p=0,y=0;if(u)for(var E=s.child;E!==null;)p|=E.lanes|E.childLanes,y|=E.subtreeFlags&65011712,y|=E.flags&65011712,E.return=s,E=E.sibling;else for(E=s.child;E!==null;)p|=E.lanes|E.childLanes,y|=E.subtreeFlags,y|=E.flags,E.return=s,E=E.sibling;return s.subtreeFlags|=y,s.childLanes=p,u}function az(s,u,p){var y=u.pendingProps;switch(Xm(u),u.tag){case 31:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return zt(u),null;case 1:return zt(u),null;case 3:return p=u.stateNode,y=null,s!==null&&(y=s.memoizedState.cache),u.memoizedState.cache!==y&&(u.flags|=2048),pi(tn),re(),p.pendingContext&&(p.context=p.pendingContext,p.pendingContext=null),(s===null||s.child===null)&&(Dl(u)?bi(u):s===null||s.memoizedState.isDehydrated&&(u.flags&256)===0||(u.flags|=1024,Ok())),zt(u),null;case 26:return p=u.memoizedState,s===null?(bi(u),p!==null?(zt(u),WA(u,p)):(zt(u),u.flags&=-16777217)):p?p!==s.memoizedState?(bi(u),zt(u),WA(u,p)):(zt(u),u.flags&=-16777217):(s.memoizedProps!==y&&bi(u),zt(u),u.flags&=-16777217),null;case 27:W(u),p=Y.current;var E=u.type;if(s!==null&&u.stateNode!=null)s.memoizedProps!==y&&bi(u);else{if(!y){if(u.stateNode===null)throw Error(r(166));return zt(u),null}s=I.current,Dl(u)?Tk(u):(s=W2(E,y,p),u.stateNode=s,bi(u))}return zt(u),null;case 5:if(W(u),p=u.type,s!==null&&u.stateNode!=null)s.memoizedProps!==y&&bi(u);else{if(!y){if(u.stateNode===null)throw Error(r(166));return zt(u),null}if(s=I.current,Dl(u))Tk(u);else{switch(E=Qf(Y.current),s){case 1:s=E.createElementNS("http://www.w3.org/2000/svg",p);break;case 2:s=E.createElementNS("http://www.w3.org/1998/Math/MathML",p);break;default:switch(p){case"svg":s=E.createElementNS("http://www.w3.org/2000/svg",p);break;case"math":s=E.createElementNS("http://www.w3.org/1998/Math/MathML",p);break;case"script":s=E.createElement("div"),s.innerHTML="<script><\/script>",s=s.removeChild(s.firstChild);break;case"select":s=typeof y.is=="string"?E.createElement("select",{is:y.is}):E.createElement("select"),y.multiple?s.multiple=!0:y.size&&(s.size=y.size);break;default:s=typeof y.is=="string"?E.createElement(p,{is:y.is}):E.createElement(p)}}s[sn]=u,s[yn]=y;e:for(E=u.child;E!==null;){if(E.tag===5||E.tag===6)s.appendChild(E.stateNode);else if(E.tag!==4&&E.tag!==27&&E.child!==null){E.child.return=E,E=E.child;continue}if(E===u)break e;for(;E.sibling===null;){if(E.return===null||E.return===u)break e;E=E.return}E.sibling.return=E.return,E=E.sibling}u.stateNode=s;e:switch(hn(s,p,y),p){case"button":case"input":case"select":case"textarea":s=!!y.autoFocus;break e;case"img":s=!0;break e;default:s=!1}s&&bi(u)}}return zt(u),u.flags&=-16777217,null;case 6:if(s&&u.stateNode!=null)s.memoizedProps!==y&&bi(u);else{if(typeof y!="string"&&u.stateNode===null)throw Error(r(166));if(s=Y.current,Dl(u)){if(s=u.stateNode,p=u.memoizedProps,y=null,E=Sn,E!==null)switch(E.tag){case 27:case 5:y=E.memoizedProps}s[sn]=u,s=!!(s.nodeValue===p||y!==null&&y.suppressHydrationWarning===!0||V2(s.nodeValue,p)),s||Za(u)}else s=Qf(s).createTextNode(y),s[sn]=u,u.stateNode=s}return zt(u),null;case 13:if(y=u.memoizedState,s===null||s.memoizedState!==null&&s.memoizedState.dehydrated!==null){if(E=Dl(u),y!==null&&y.dehydrated!==null){if(s===null){if(!E)throw Error(r(318));if(E=u.memoizedState,E=E!==null?E.dehydrated:null,!E)throw Error(r(317));E[sn]=u}else Il(),(u.flags&128)===0&&(u.memoizedState=null),u.flags|=4;zt(u),E=!1}else E=Ok(),s!==null&&s.memoizedState!==null&&(s.memoizedState.hydrationErrors=E),E=!0;if(!E)return u.flags&256?(gi(u),u):(gi(u),null)}if(gi(u),(u.flags&128)!==0)return u.lanes=p,u;if(p=y!==null,s=s!==null&&s.memoizedState!==null,p){y=u.child,E=null,y.alternate!==null&&y.alternate.memoizedState!==null&&y.alternate.memoizedState.cachePool!==null&&(E=y.alternate.memoizedState.cachePool.pool);var C=null;y.memoizedState!==null&&y.memoizedState.cachePool!==null&&(C=y.memoizedState.cachePool.pool),C!==E&&(y.flags|=2048)}return p!==s&&p&&(u.child.flags|=8192),zf(u,u.updateQueue),zt(u),null;case 4:return re(),s===null&&ly(u.stateNode.containerInfo),zt(u),null;case 10:return pi(u.type),zt(u),null;case 19:if(X(nn),E=u.memoizedState,E===null)return zt(u),null;if(y=(u.flags&128)!==0,C=E.rendering,C===null)if(y)Ql(E,!1);else{if(Ft!==0||s!==null&&(s.flags&128)!==0)for(s=u.child;s!==null;){if(C=$f(s),C!==null){for(u.flags|=128,Ql(E,!1),s=C.updateQueue,u.updateQueue=s,zf(u,s),u.subtreeFlags=0,s=p,p=u.child;p!==null;)kk(p,s),p=p.sibling;return j(nn,nn.current&1|2),u.child}s=s.sibling}E.tail!==null&&we()>Bf&&(u.flags|=128,y=!0,Ql(E,!1),u.lanes=4194304)}else{if(!y)if(s=$f(C),s!==null){if(u.flags|=128,y=!0,s=s.updateQueue,u.updateQueue=s,zf(u,s),Ql(E,!0),E.tail===null&&E.tailMode==="hidden"&&!C.alternate&&!pt)return zt(u),null}else 2*we()-E.renderingStartTime>Bf&&p!==536870912&&(u.flags|=128,y=!0,Ql(E,!1),u.lanes=4194304);E.isBackwards?(C.sibling=u.child,u.child=C):(s=E.last,s!==null?s.sibling=C:u.child=C,E.last=C)}return E.tail!==null?(u=E.tail,E.rendering=u,E.tail=u.sibling,E.renderingStartTime=we(),u.sibling=null,s=nn.current,j(nn,y?s&1|2:s&1),u):(zt(u),null);case 22:case 23:return gi(u),cg(),y=u.memoizedState!==null,s!==null?s.memoizedState!==null!==y&&(u.flags|=8192):y&&(u.flags|=8192),y?(p&536870912)!==0&&(u.flags&128)===0&&(zt(u),u.subtreeFlags&6&&(u.flags|=8192)):zt(u),p=u.updateQueue,p!==null&&zf(u,p.retryQueue),p=null,s!==null&&s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(p=s.memoizedState.cachePool.pool),y=null,u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(y=u.memoizedState.cachePool.pool),y!==p&&(u.flags|=2048),s!==null&&X(Wa),null;case 24:return p=null,s!==null&&(p=s.memoizedState.cache),u.memoizedState.cache!==p&&(u.flags|=2048),pi(tn),zt(u),null;case 25:return null;case 30:return null}throw Error(r(156,u.tag))}function sz(s,u){switch(Xm(u),u.tag){case 1:return s=u.flags,s&65536?(u.flags=s&-65537|128,u):null;case 3:return pi(tn),re(),s=u.flags,(s&65536)!==0&&(s&128)===0?(u.flags=s&-65537|128,u):null;case 26:case 27:case 5:return W(u),null;case 13:if(gi(u),s=u.memoizedState,s!==null&&s.dehydrated!==null){if(u.alternate===null)throw Error(r(340));Il()}return s=u.flags,s&65536?(u.flags=s&-65537|128,u):null;case 19:return X(nn),null;case 4:return re(),null;case 10:return pi(u.type),null;case 22:case 23:return gi(u),cg(),s!==null&&X(Wa),s=u.flags,s&65536?(u.flags=s&-65537|128,u):null;case 24:return pi(tn),null;case 25:return null;default:return null}}function QA(s,u){switch(Xm(u),u.tag){case 3:pi(tn),re();break;case 26:case 27:case 5:W(u);break;case 4:re();break;case 13:gi(u);break;case 19:X(nn);break;case 10:pi(u.type);break;case 22:case 23:gi(u),cg(),s!==null&&X(Wa);break;case 24:pi(tn)}}function Jl(s,u){try{var p=u.updateQueue,y=p!==null?p.lastEffect:null;if(y!==null){var E=y.next;p=E;do{if((p.tag&s)===s){y=void 0;var C=p.create,F=p.inst;y=C(),F.destroy=y}p=p.next}while(p!==E)}}catch(Z){At(u,u.return,Z)}}function ra(s,u,p){try{var y=u.updateQueue,E=y!==null?y.lastEffect:null;if(E!==null){var C=E.next;y=C;do{if((y.tag&s)===s){var F=y.inst,Z=F.destroy;if(Z!==void 0){F.destroy=void 0,E=u;var ee=p,ce=Z;try{ce()}catch(ge){At(E,ee,ge)}}}y=y.next}while(y!==C)}}catch(ge){At(u,u.return,ge)}}function JA(s){var u=s.updateQueue;if(u!==null){var p=s.stateNode;try{qk(u,p)}catch(y){At(s,s.return,y)}}}function e2(s,u,p){p.props=Ja(s.type,s.memoizedProps),p.state=s.memoizedState;try{p.componentWillUnmount()}catch(y){At(s,u,y)}}function eu(s,u){try{var p=s.ref;if(p!==null){switch(s.tag){case 26:case 27:case 5:var y=s.stateNode;break;case 30:y=s.stateNode;break;default:y=s.stateNode}typeof p=="function"?s.refCleanup=p(y):p.current=y}}catch(E){At(s,u,E)}}function Br(s,u){var p=s.ref,y=s.refCleanup;if(p!==null)if(typeof y=="function")try{y()}catch(E){At(s,u,E)}finally{s.refCleanup=null,s=s.alternate,s!=null&&(s.refCleanup=null)}else if(typeof p=="function")try{p(null)}catch(E){At(s,u,E)}else p.current=null}function t2(s){var u=s.type,p=s.memoizedProps,y=s.stateNode;try{e:switch(u){case"button":case"input":case"select":case"textarea":p.autoFocus&&y.focus();break e;case"img":p.src?y.src=p.src:p.srcSet&&(y.srcset=p.srcSet)}}catch(E){At(s,s.return,E)}}function Lg(s,u,p){try{var y=s.stateNode;Tz(y,s.type,p,u),y[yn]=u}catch(E){At(s,s.return,E)}}function n2(s){return s.tag===5||s.tag===3||s.tag===26||s.tag===27&&fa(s.type)||s.tag===4}function zg(s){e:for(;;){for(;s.sibling===null;){if(s.return===null||n2(s.return))return null;s=s.return}for(s.sibling.return=s.return,s=s.sibling;s.tag!==5&&s.tag!==6&&s.tag!==18;){if(s.tag===27&&fa(s.type)||s.flags&2||s.child===null||s.tag===4)continue e;s.child.return=s,s=s.child}if(!(s.flags&2))return s.stateNode}}function qg(s,u,p){var y=s.tag;if(y===5||y===6)s=s.stateNode,u?(p.nodeType===9?p.body:p.nodeName==="HTML"?p.ownerDocument.body:p).insertBefore(s,u):(u=p.nodeType===9?p.body:p.nodeName==="HTML"?p.ownerDocument.body:p,u.appendChild(s),p=p._reactRootContainer,p!=null||u.onclick!==null||(u.onclick=Wf));else if(y!==4&&(y===27&&fa(s.type)&&(p=s.stateNode,u=null),s=s.child,s!==null))for(qg(s,u,p),s=s.sibling;s!==null;)qg(s,u,p),s=s.sibling}function qf(s,u,p){var y=s.tag;if(y===5||y===6)s=s.stateNode,u?p.insertBefore(s,u):p.appendChild(s);else if(y!==4&&(y===27&&fa(s.type)&&(p=s.stateNode),s=s.child,s!==null))for(qf(s,u,p),s=s.sibling;s!==null;)qf(s,u,p),s=s.sibling}function r2(s){var u=s.stateNode,p=s.memoizedProps;try{for(var y=s.type,E=u.attributes;E.length;)u.removeAttributeNode(E[0]);hn(u,y,p),u[sn]=s,u[yn]=p}catch(C){At(s,s.return,C)}}var vi=!1,Ht=!1,Fg=!1,i2=typeof WeakSet=="function"?WeakSet:Set,ln=null;function oz(s,u){if(s=s.containerInfo,fy=id,s=mk(s),zm(s)){if("selectionStart"in s)var p={start:s.selectionStart,end:s.selectionEnd};else e:{p=(p=s.ownerDocument)&&p.defaultView||window;var y=p.getSelection&&p.getSelection();if(y&&y.rangeCount!==0){p=y.anchorNode;var E=y.anchorOffset,C=y.focusNode;y=y.focusOffset;try{p.nodeType,C.nodeType}catch{p=null;break e}var F=0,Z=-1,ee=-1,ce=0,ge=0,ve=s,de=null;t:for(;;){for(var he;ve!==p||E!==0&&ve.nodeType!==3||(Z=F+E),ve!==C||y!==0&&ve.nodeType!==3||(ee=F+y),ve.nodeType===3&&(F+=ve.nodeValue.length),(he=ve.firstChild)!==null;)de=ve,ve=he;for(;;){if(ve===s)break t;if(de===p&&++ce===E&&(Z=F),de===C&&++ge===y&&(ee=F),(he=ve.nextSibling)!==null)break;ve=de,de=ve.parentNode}ve=he}p=Z===-1||ee===-1?null:{start:Z,end:ee}}else p=null}p=p||{start:0,end:0}}else p=null;for(dy={focusedElem:s,selectionRange:p},id=!1,ln=u;ln!==null;)if(u=ln,s=u.child,(u.subtreeFlags&1024)!==0&&s!==null)s.return=u,ln=s;else for(;ln!==null;){switch(u=ln,C=u.alternate,s=u.flags,u.tag){case 0:break;case 11:case 15:break;case 1:if((s&1024)!==0&&C!==null){s=void 0,p=u,E=C.memoizedProps,C=C.memoizedState,y=p.stateNode;try{var Fe=Ja(p.type,E,p.elementType===p.type);s=y.getSnapshotBeforeUpdate(Fe,C),y.__reactInternalSnapshotBeforeUpdate=s}catch(Le){At(p,p.return,Le)}}break;case 3:if((s&1024)!==0){if(s=u.stateNode.containerInfo,p=s.nodeType,p===9)my(s);else if(p===1)switch(s.nodeName){case"HEAD":case"HTML":case"BODY":my(s);break;default:s.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((s&1024)!==0)throw Error(r(163))}if(s=u.sibling,s!==null){s.return=u.return,ln=s;break}ln=u.return}}function a2(s,u,p){var y=p.flags;switch(p.tag){case 0:case 11:case 15:ia(s,p),y&4&&Jl(5,p);break;case 1:if(ia(s,p),y&4)if(s=p.stateNode,u===null)try{s.componentDidMount()}catch(F){At(p,p.return,F)}else{var E=Ja(p.type,u.memoizedProps);u=u.memoizedState;try{s.componentDidUpdate(E,u,s.__reactInternalSnapshotBeforeUpdate)}catch(F){At(p,p.return,F)}}y&64&&JA(p),y&512&&eu(p,p.return);break;case 3:if(ia(s,p),y&64&&(s=p.updateQueue,s!==null)){if(u=null,p.child!==null)switch(p.child.tag){case 27:case 5:u=p.child.stateNode;break;case 1:u=p.child.stateNode}try{qk(s,u)}catch(F){At(p,p.return,F)}}break;case 27:u===null&&y&4&&r2(p);case 26:case 5:ia(s,p),u===null&&y&4&&t2(p),y&512&&eu(p,p.return);break;case 12:ia(s,p);break;case 13:ia(s,p),y&4&&l2(s,p),y&64&&(s=p.memoizedState,s!==null&&(s=s.dehydrated,s!==null&&(p=gz.bind(null,p),$z(s,p))));break;case 22:if(y=p.memoizedState!==null||vi,!y){u=u!==null&&u.memoizedState!==null||Ht,E=vi;var C=Ht;vi=y,(Ht=u)&&!C?aa(s,p,(p.subtreeFlags&8772)!==0):ia(s,p),vi=E,Ht=C}break;case 30:break;default:ia(s,p)}}function s2(s){var u=s.alternate;u!==null&&(s.alternate=null,s2(u)),s.child=null,s.deletions=null,s.sibling=null,s.tag===5&&(u=s.stateNode,u!==null&&xl(u)),s.stateNode=null,s.return=null,s.dependencies=null,s.memoizedProps=null,s.memoizedState=null,s.pendingProps=null,s.stateNode=null,s.updateQueue=null}var Pt=null,$n=!1;function _i(s,u,p){for(p=p.child;p!==null;)o2(s,u,p),p=p.sibling}function o2(s,u,p){if(_e&&typeof _e.onCommitFiberUnmount=="function")try{_e.onCommitFiberUnmount(pe,p)}catch{}switch(p.tag){case 26:Ht||Br(p,u),_i(s,u,p),p.memoizedState?p.memoizedState.count--:p.stateNode&&(p=p.stateNode,p.parentNode.removeChild(p));break;case 27:Ht||Br(p,u);var y=Pt,E=$n;fa(p.type)&&(Pt=p.stateNode,$n=!1),_i(s,u,p),uu(p.stateNode),Pt=y,$n=E;break;case 5:Ht||Br(p,u);case 6:if(y=Pt,E=$n,Pt=null,_i(s,u,p),Pt=y,$n=E,Pt!==null)if($n)try{(Pt.nodeType===9?Pt.body:Pt.nodeName==="HTML"?Pt.ownerDocument.body:Pt).removeChild(p.stateNode)}catch(C){At(p,u,C)}else try{Pt.removeChild(p.stateNode)}catch(C){At(p,u,C)}break;case 18:Pt!==null&&($n?(s=Pt,K2(s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s,p.stateNode),yu(s)):K2(Pt,p.stateNode));break;case 4:y=Pt,E=$n,Pt=p.stateNode.containerInfo,$n=!0,_i(s,u,p),Pt=y,$n=E;break;case 0:case 11:case 14:case 15:Ht||ra(2,p,u),Ht||ra(4,p,u),_i(s,u,p);break;case 1:Ht||(Br(p,u),y=p.stateNode,typeof y.componentWillUnmount=="function"&&e2(p,u,y)),_i(s,u,p);break;case 21:_i(s,u,p);break;case 22:Ht=(y=Ht)||p.memoizedState!==null,_i(s,u,p),Ht=y;break;default:_i(s,u,p)}}function l2(s,u){if(u.memoizedState===null&&(s=u.alternate,s!==null&&(s=s.memoizedState,s!==null&&(s=s.dehydrated,s!==null))))try{yu(s)}catch(p){At(u,u.return,p)}}function lz(s){switch(s.tag){case 13:case 19:var u=s.stateNode;return u===null&&(u=s.stateNode=new i2),u;case 22:return s=s.stateNode,u=s._retryCache,u===null&&(u=s._retryCache=new i2),u;default:throw Error(r(435,s.tag))}}function Bg(s,u){var p=lz(s);u.forEach(function(y){var E=yz.bind(null,s,y);p.has(y)||(p.add(y),y.then(E,E))})}function Hn(s,u){var p=u.deletions;if(p!==null)for(var y=0;y<p.length;y++){var E=p[y],C=s,F=u,Z=F;e:for(;Z!==null;){switch(Z.tag){case 27:if(fa(Z.type)){Pt=Z.stateNode,$n=!1;break e}break;case 5:Pt=Z.stateNode,$n=!1;break e;case 3:case 4:Pt=Z.stateNode.containerInfo,$n=!0;break e}Z=Z.return}if(Pt===null)throw Error(r(160));o2(C,F,E),Pt=null,$n=!1,C=E.alternate,C!==null&&(C.return=null),E.return=null}if(u.subtreeFlags&13878)for(u=u.child;u!==null;)u2(u,s),u=u.sibling}var Sr=null;function u2(s,u){var p=s.alternate,y=s.flags;switch(s.tag){case 0:case 11:case 14:case 15:Hn(u,s),Gn(s),y&4&&(ra(3,s,s.return),Jl(3,s),ra(5,s,s.return));break;case 1:Hn(u,s),Gn(s),y&512&&(Ht||p===null||Br(p,p.return)),y&64&&vi&&(s=s.updateQueue,s!==null&&(y=s.callbacks,y!==null&&(p=s.shared.hiddenCallbacks,s.shared.hiddenCallbacks=p===null?y:p.concat(y))));break;case 26:var E=Sr;if(Hn(u,s),Gn(s),y&512&&(Ht||p===null||Br(p,p.return)),y&4){var C=p!==null?p.memoizedState:null;if(y=s.memoizedState,p===null)if(y===null)if(s.stateNode===null){e:{y=s.type,p=s.memoizedProps,E=E.ownerDocument||E;t:switch(y){case"title":C=E.getElementsByTagName("title")[0],(!C||C[qa]||C[sn]||C.namespaceURI==="http://www.w3.org/2000/svg"||C.hasAttribute("itemprop"))&&(C=E.createElement(y),E.head.insertBefore(C,E.querySelector("head > title"))),hn(C,y,p),C[sn]=s,Zt(C),y=C;break e;case"link":var F=rT("link","href",E).get(y+(p.href||""));if(F){for(var Z=0;Z<F.length;Z++)if(C=F[Z],C.getAttribute("href")===(p.href==null||p.href===""?null:p.href)&&C.getAttribute("rel")===(p.rel==null?null:p.rel)&&C.getAttribute("title")===(p.title==null?null:p.title)&&C.getAttribute("crossorigin")===(p.crossOrigin==null?null:p.crossOrigin)){F.splice(Z,1);break t}}C=E.createElement(y),hn(C,y,p),E.head.appendChild(C);break;case"meta":if(F=rT("meta","content",E).get(y+(p.content||""))){for(Z=0;Z<F.length;Z++)if(C=F[Z],C.getAttribute("content")===(p.content==null?null:""+p.content)&&C.getAttribute("name")===(p.name==null?null:p.name)&&C.getAttribute("property")===(p.property==null?null:p.property)&&C.getAttribute("http-equiv")===(p.httpEquiv==null?null:p.httpEquiv)&&C.getAttribute("charset")===(p.charSet==null?null:p.charSet)){F.splice(Z,1);break t}}C=E.createElement(y),hn(C,y,p),E.head.appendChild(C);break;default:throw Error(r(468,y))}C[sn]=s,Zt(C),y=C}s.stateNode=y}else iT(E,s.type,s.stateNode);else s.stateNode=nT(E,y,s.memoizedProps);else C!==y?(C===null?p.stateNode!==null&&(p=p.stateNode,p.parentNode.removeChild(p)):C.count--,y===null?iT(E,s.type,s.stateNode):nT(E,y,s.memoizedProps)):y===null&&s.stateNode!==null&&Lg(s,s.memoizedProps,p.memoizedProps)}break;case 27:Hn(u,s),Gn(s),y&512&&(Ht||p===null||Br(p,p.return)),p!==null&&y&4&&Lg(s,s.memoizedProps,p.memoizedProps);break;case 5:if(Hn(u,s),Gn(s),y&512&&(Ht||p===null||Br(p,p.return)),s.flags&32){E=s.stateNode;try{Us(E,"")}catch(he){At(s,s.return,he)}}y&4&&s.stateNode!=null&&(E=s.memoizedProps,Lg(s,E,p!==null?p.memoizedProps:E)),y&1024&&(Fg=!0);break;case 6:if(Hn(u,s),Gn(s),y&4){if(s.stateNode===null)throw Error(r(162));y=s.memoizedProps,p=s.stateNode;try{p.nodeValue=y}catch(he){At(s,s.return,he)}}break;case 3:if(td=null,E=Sr,Sr=Jf(u.containerInfo),Hn(u,s),Sr=E,Gn(s),y&4&&p!==null&&p.memoizedState.isDehydrated)try{yu(u.containerInfo)}catch(he){At(s,s.return,he)}Fg&&(Fg=!1,c2(s));break;case 4:y=Sr,Sr=Jf(s.stateNode.containerInfo),Hn(u,s),Gn(s),Sr=y;break;case 12:Hn(u,s),Gn(s);break;case 13:Hn(u,s),Gn(s),s.child.flags&8192&&s.memoizedState!==null!=(p!==null&&p.memoizedState!==null)&&(Zg=we()),y&4&&(y=s.updateQueue,y!==null&&(s.updateQueue=null,Bg(s,y)));break;case 22:E=s.memoizedState!==null;var ee=p!==null&&p.memoizedState!==null,ce=vi,ge=Ht;if(vi=ce||E,Ht=ge||ee,Hn(u,s),Ht=ge,vi=ce,Gn(s),y&8192)e:for(u=s.stateNode,u._visibility=E?u._visibility&-2:u._visibility|1,E&&(p===null||ee||vi||Ht||es(s)),p=null,u=s;;){if(u.tag===5||u.tag===26){if(p===null){ee=p=u;try{if(C=ee.stateNode,E)F=C.style,typeof F.setProperty=="function"?F.setProperty("display","none","important"):F.display="none";else{Z=ee.stateNode;var ve=ee.memoizedProps.style,de=ve!=null&&ve.hasOwnProperty("display")?ve.display:null;Z.style.display=de==null||typeof de=="boolean"?"":(""+de).trim()}}catch(he){At(ee,ee.return,he)}}}else if(u.tag===6){if(p===null){ee=u;try{ee.stateNode.nodeValue=E?"":ee.memoizedProps}catch(he){At(ee,ee.return,he)}}}else if((u.tag!==22&&u.tag!==23||u.memoizedState===null||u===s)&&u.child!==null){u.child.return=u,u=u.child;continue}if(u===s)break e;for(;u.sibling===null;){if(u.return===null||u.return===s)break e;p===u&&(p=null),u=u.return}p===u&&(p=null),u.sibling.return=u.return,u=u.sibling}y&4&&(y=s.updateQueue,y!==null&&(p=y.retryQueue,p!==null&&(y.retryQueue=null,Bg(s,p))));break;case 19:Hn(u,s),Gn(s),y&4&&(y=s.updateQueue,y!==null&&(s.updateQueue=null,Bg(s,y)));break;case 30:break;case 21:break;default:Hn(u,s),Gn(s)}}function Gn(s){var u=s.flags;if(u&2){try{for(var p,y=s.return;y!==null;){if(n2(y)){p=y;break}y=y.return}if(p==null)throw Error(r(160));switch(p.tag){case 27:var E=p.stateNode,C=zg(s);qf(s,C,E);break;case 5:var F=p.stateNode;p.flags&32&&(Us(F,""),p.flags&=-33);var Z=zg(s);qf(s,Z,F);break;case 3:case 4:var ee=p.stateNode.containerInfo,ce=zg(s);qg(s,ce,ee);break;default:throw Error(r(161))}}catch(ge){At(s,s.return,ge)}s.flags&=-3}u&4096&&(s.flags&=-4097)}function c2(s){if(s.subtreeFlags&1024)for(s=s.child;s!==null;){var u=s;c2(u),u.tag===5&&u.flags&1024&&u.stateNode.reset(),s=s.sibling}}function ia(s,u){if(u.subtreeFlags&8772)for(u=u.child;u!==null;)a2(s,u.alternate,u),u=u.sibling}function es(s){for(s=s.child;s!==null;){var u=s;switch(u.tag){case 0:case 11:case 14:case 15:ra(4,u,u.return),es(u);break;case 1:Br(u,u.return);var p=u.stateNode;typeof p.componentWillUnmount=="function"&&e2(u,u.return,p),es(u);break;case 27:uu(u.stateNode);case 26:case 5:Br(u,u.return),es(u);break;case 22:u.memoizedState===null&&es(u);break;case 30:es(u);break;default:es(u)}s=s.sibling}}function aa(s,u,p){for(p=p&&(u.subtreeFlags&8772)!==0,u=u.child;u!==null;){var y=u.alternate,E=s,C=u,F=C.flags;switch(C.tag){case 0:case 11:case 15:aa(E,C,p),Jl(4,C);break;case 1:if(aa(E,C,p),y=C,E=y.stateNode,typeof E.componentDidMount=="function")try{E.componentDidMount()}catch(ce){At(y,y.return,ce)}if(y=C,E=y.updateQueue,E!==null){var Z=y.stateNode;try{var ee=E.shared.hiddenCallbacks;if(ee!==null)for(E.shared.hiddenCallbacks=null,E=0;E<ee.length;E++)zk(ee[E],Z)}catch(ce){At(y,y.return,ce)}}p&&F&64&&JA(C),eu(C,C.return);break;case 27:r2(C);case 26:case 5:aa(E,C,p),p&&y===null&&F&4&&t2(C),eu(C,C.return);break;case 12:aa(E,C,p);break;case 13:aa(E,C,p),p&&F&4&&l2(E,C);break;case 22:C.memoizedState===null&&aa(E,C,p),eu(C,C.return);break;case 30:break;default:aa(E,C,p)}u=u.sibling}}function Ug(s,u){var p=null;s!==null&&s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(p=s.memoizedState.cachePool.pool),s=null,u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(s=u.memoizedState.cachePool.pool),s!==p&&(s!=null&&s.refCount++,p!=null&&zl(p))}function Vg(s,u){s=null,u.alternate!==null&&(s=u.alternate.memoizedState.cache),u=u.memoizedState.cache,u!==s&&(u.refCount++,s!=null&&zl(s))}function Ur(s,u,p,y){if(u.subtreeFlags&10256)for(u=u.child;u!==null;)f2(s,u,p,y),u=u.sibling}function f2(s,u,p,y){var E=u.flags;switch(u.tag){case 0:case 11:case 15:Ur(s,u,p,y),E&2048&&Jl(9,u);break;case 1:Ur(s,u,p,y);break;case 3:Ur(s,u,p,y),E&2048&&(s=null,u.alternate!==null&&(s=u.alternate.memoizedState.cache),u=u.memoizedState.cache,u!==s&&(u.refCount++,s!=null&&zl(s)));break;case 12:if(E&2048){Ur(s,u,p,y),s=u.stateNode;try{var C=u.memoizedProps,F=C.id,Z=C.onPostCommit;typeof Z=="function"&&Z(F,u.alternate===null?"mount":"update",s.passiveEffectDuration,-0)}catch(ee){At(u,u.return,ee)}}else Ur(s,u,p,y);break;case 13:Ur(s,u,p,y);break;case 23:break;case 22:C=u.stateNode,F=u.alternate,u.memoizedState!==null?C._visibility&2?Ur(s,u,p,y):tu(s,u):C._visibility&2?Ur(s,u,p,y):(C._visibility|=2,lo(s,u,p,y,(u.subtreeFlags&10256)!==0)),E&2048&&Ug(F,u);break;case 24:Ur(s,u,p,y),E&2048&&Vg(u.alternate,u);break;default:Ur(s,u,p,y)}}function lo(s,u,p,y,E){for(E=E&&(u.subtreeFlags&10256)!==0,u=u.child;u!==null;){var C=s,F=u,Z=p,ee=y,ce=F.flags;switch(F.tag){case 0:case 11:case 15:lo(C,F,Z,ee,E),Jl(8,F);break;case 23:break;case 22:var ge=F.stateNode;F.memoizedState!==null?ge._visibility&2?lo(C,F,Z,ee,E):tu(C,F):(ge._visibility|=2,lo(C,F,Z,ee,E)),E&&ce&2048&&Ug(F.alternate,F);break;case 24:lo(C,F,Z,ee,E),E&&ce&2048&&Vg(F.alternate,F);break;default:lo(C,F,Z,ee,E)}u=u.sibling}}function tu(s,u){if(u.subtreeFlags&10256)for(u=u.child;u!==null;){var p=s,y=u,E=y.flags;switch(y.tag){case 22:tu(p,y),E&2048&&Ug(y.alternate,y);break;case 24:tu(p,y),E&2048&&Vg(y.alternate,y);break;default:tu(p,y)}u=u.sibling}}var nu=8192;function uo(s){if(s.subtreeFlags&nu)for(s=s.child;s!==null;)d2(s),s=s.sibling}function d2(s){switch(s.tag){case 26:uo(s),s.flags&nu&&s.memoizedState!==null&&Yz(Sr,s.memoizedState,s.memoizedProps);break;case 5:uo(s);break;case 3:case 4:var u=Sr;Sr=Jf(s.stateNode.containerInfo),uo(s),Sr=u;break;case 22:s.memoizedState===null&&(u=s.alternate,u!==null&&u.memoizedState!==null?(u=nu,nu=16777216,uo(s),nu=u):uo(s));break;default:uo(s)}}function h2(s){var u=s.alternate;if(u!==null&&(s=u.child,s!==null)){u.child=null;do u=s.sibling,s.sibling=null,s=u;while(s!==null)}}function ru(s){var u=s.deletions;if((s.flags&16)!==0){if(u!==null)for(var p=0;p<u.length;p++){var y=u[p];ln=y,m2(y,s)}h2(s)}if(s.subtreeFlags&10256)for(s=s.child;s!==null;)p2(s),s=s.sibling}function p2(s){switch(s.tag){case 0:case 11:case 15:ru(s),s.flags&2048&&ra(9,s,s.return);break;case 3:ru(s);break;case 12:ru(s);break;case 22:var u=s.stateNode;s.memoizedState!==null&&u._visibility&2&&(s.return===null||s.return.tag!==13)?(u._visibility&=-3,Ff(s)):ru(s);break;default:ru(s)}}function Ff(s){var u=s.deletions;if((s.flags&16)!==0){if(u!==null)for(var p=0;p<u.length;p++){var y=u[p];ln=y,m2(y,s)}h2(s)}for(s=s.child;s!==null;){switch(u=s,u.tag){case 0:case 11:case 15:ra(8,u,u.return),Ff(u);break;case 22:p=u.stateNode,p._visibility&2&&(p._visibility&=-3,Ff(u));break;default:Ff(u)}s=s.sibling}}function m2(s,u){for(;ln!==null;){var p=ln;switch(p.tag){case 0:case 11:case 15:ra(8,p,u);break;case 23:case 22:if(p.memoizedState!==null&&p.memoizedState.cachePool!==null){var y=p.memoizedState.cachePool.pool;y!=null&&y.refCount++}break;case 24:zl(p.memoizedState.cache)}if(y=p.child,y!==null)y.return=p,ln=y;else e:for(p=s;ln!==null;){y=ln;var E=y.sibling,C=y.return;if(s2(y),y===p){ln=null;break e}if(E!==null){E.return=C,ln=E;break e}ln=C}}}var uz={getCacheForType:function(s){var u=bn(tn),p=u.data.get(s);return p===void 0&&(p=s(),u.data.set(s,p)),p}},cz=typeof WeakMap=="function"?WeakMap:Map,bt=0,Nt=null,et=null,at=0,vt=0,Yn=null,sa=!1,co=!1,Hg=!1,xi=0,Ft=0,oa=0,ts=0,Gg=0,pr=0,fo=0,iu=null,Dn=null,Yg=!1,Zg=0,Bf=1/0,Uf=null,la=null,dn=0,ua=null,ho=null,po=0,Kg=0,Xg=null,g2=null,au=0,Wg=null;function Zn(){if((bt&2)!==0&&at!==0)return at&-at;if(B.T!==null){var s=eo;return s!==0?s:iy()}return Zc()}function y2(){pr===0&&(pr=(at&536870912)===0||pt?Hc():536870912);var s=hr.current;return s!==null&&(s.flags|=32),pr}function Kn(s,u,p){(s===Nt&&(vt===2||vt===9)||s.cancelPendingCommit!==null)&&(mo(s,0),ca(s,at,pr,!1)),za(s,p),((bt&2)===0||s!==Nt)&&(s===Nt&&((bt&2)===0&&(ts|=p),Ft===4&&ca(s,at,pr,!1)),Vr(s))}function b2(s,u,p){if((bt&6)!==0)throw Error(r(327));var y=!p&&(u&124)===0&&(u&s.expiredLanes)===0||On(s,u),E=y?hz(s,u):ey(s,u,!0),C=y;do{if(E===0){co&&!y&&ca(s,u,0,!1);break}else{if(p=s.current.alternate,C&&!fz(p)){E=ey(s,u,!1),C=!1;continue}if(E===2){if(C=u,s.errorRecoveryDisabledLanes&C)var F=0;else F=s.pendingLanes&-536870913,F=F!==0?F:F&536870912?536870912:0;if(F!==0){u=F;e:{var Z=s;E=iu;var ee=Z.current.memoizedState.isDehydrated;if(ee&&(mo(Z,F).flags|=256),F=ey(Z,F,!1),F!==2){if(Hg&&!ee){Z.errorRecoveryDisabledLanes|=C,ts|=C,E=4;break e}C=Dn,Dn=E,C!==null&&(Dn===null?Dn=C:Dn.push.apply(Dn,C))}E=F}if(C=!1,E!==2)continue}}if(E===1){mo(s,0),ca(s,u,0,!0);break}e:{switch(y=s,C=E,C){case 0:case 1:throw Error(r(345));case 4:if((u&4194048)!==u)break;case 6:ca(y,u,pr,!sa);break e;case 2:Dn=null;break;case 3:case 5:break;default:throw Error(r(329))}if((u&62914560)===u&&(E=Zg+300-we(),10<E)){if(ca(y,u,pr,!sa),Yt(y,0,!0)!==0)break e;y.timeoutHandle=Y2(v2.bind(null,y,p,Dn,Uf,Yg,u,pr,ts,fo,sa,C,2,-0,0),E);break e}v2(y,p,Dn,Uf,Yg,u,pr,ts,fo,sa,C,0,-0,0)}}break}while(!0);Vr(s)}function v2(s,u,p,y,E,C,F,Z,ee,ce,ge,ve,de,he){if(s.timeoutHandle=-1,ve=u.subtreeFlags,(ve&8192||(ve&16785408)===16785408)&&(du={stylesheets:null,count:0,unsuspend:Gz},d2(u),ve=Zz(),ve!==null)){s.cancelPendingCommit=ve(A2.bind(null,s,u,C,p,y,E,F,Z,ee,ge,1,de,he)),ca(s,C,F,!ce);return}A2(s,u,C,p,y,E,F,Z,ee)}function fz(s){for(var u=s;;){var p=u.tag;if((p===0||p===11||p===15)&&u.flags&16384&&(p=u.updateQueue,p!==null&&(p=p.stores,p!==null)))for(var y=0;y<p.length;y++){var E=p[y],C=E.getSnapshot;E=E.value;try{if(!Un(C(),E))return!1}catch{return!1}}if(p=u.child,u.subtreeFlags&16384&&p!==null)p.return=u,u=p;else{if(u===s)break;for(;u.sibling===null;){if(u.return===null||u.return===s)return!0;u=u.return}u.sibling.return=u.return,u=u.sibling}}return!0}function ca(s,u,p,y){u&=~Gg,u&=~ts,s.suspendedLanes|=u,s.pingedLanes&=~u,y&&(s.warmLanes|=u),y=s.expirationTimes;for(var E=u;0<E;){var C=31-je(E),F=1<<C;y[C]=-1,E&=~F}p!==0&&yl(s,p,u)}function Vf(){return(bt&6)===0?(su(0),!1):!0}function Qg(){if(et!==null){if(vt===0)var s=et.return;else s=et,hi=Ka=null,mg(s),so=null,Xl=0,s=et;for(;s!==null;)QA(s.alternate,s),s=s.return;et=null}}function mo(s,u){var p=s.timeoutHandle;p!==-1&&(s.timeoutHandle=-1,Oz(p)),p=s.cancelPendingCommit,p!==null&&(s.cancelPendingCommit=null,p()),Qg(),Nt=s,et=p=ci(s.current,null),at=u,vt=0,Yn=null,sa=!1,co=On(s,u),Hg=!1,fo=pr=Gg=ts=oa=Ft=0,Dn=iu=null,Yg=!1,(u&8)!==0&&(u|=u&32);var y=s.entangledLanes;if(y!==0)for(s=s.entanglements,y&=u;0<y;){var E=31-je(y),C=1<<E;u|=s[E],y&=~C}return xi=u,df(),p}function _2(s,u){Ze=null,B.H=Rf,u===Fl||u===xf?(u=Pk(),vt=3):u===$k?(u=Pk(),vt=4):vt=u===LA?8:u!==null&&typeof u=="object"&&typeof u.then=="function"?6:1,Yn=u,et===null&&(Ft=1,If(s,ur(u,s.current)))}function x2(){var s=B.H;return B.H=Rf,s===null?Rf:s}function w2(){var s=B.A;return B.A=uz,s}function Jg(){Ft=4,sa||(at&4194048)!==at&&hr.current!==null||(co=!0),(oa&134217727)===0&&(ts&134217727)===0||Nt===null||ca(Nt,at,pr,!1)}function ey(s,u,p){var y=bt;bt|=2;var E=x2(),C=w2();(Nt!==s||at!==u)&&(Uf=null,mo(s,u)),u=!1;var F=Ft;e:do try{if(vt!==0&&et!==null){var Z=et,ee=Yn;switch(vt){case 8:Qg(),F=6;break e;case 3:case 2:case 9:case 6:hr.current===null&&(u=!0);var ce=vt;if(vt=0,Yn=null,go(s,Z,ee,ce),p&&co){F=0;break e}break;default:ce=vt,vt=0,Yn=null,go(s,Z,ee,ce)}}dz(),F=Ft;break}catch(ge){_2(s,ge)}while(!0);return u&&s.shellSuspendCounter++,hi=Ka=null,bt=y,B.H=E,B.A=C,et===null&&(Nt=null,at=0,df()),F}function dz(){for(;et!==null;)S2(et)}function hz(s,u){var p=bt;bt|=2;var y=x2(),E=w2();Nt!==s||at!==u?(Uf=null,Bf=we()+500,mo(s,u)):co=On(s,u);e:do try{if(vt!==0&&et!==null){u=et;var C=Yn;t:switch(vt){case 1:vt=0,Yn=null,go(s,u,C,1);break;case 2:case 9:if(Dk(C)){vt=0,Yn=null,E2(u);break}u=function(){vt!==2&&vt!==9||Nt!==s||(vt=7),Vr(s)},C.then(u,u);break e;case 3:vt=7;break e;case 4:vt=5;break e;case 7:Dk(C)?(vt=0,Yn=null,E2(u)):(vt=0,Yn=null,go(s,u,C,7));break;case 5:var F=null;switch(et.tag){case 26:F=et.memoizedState;case 5:case 27:var Z=et;if(!F||aT(F)){vt=0,Yn=null;var ee=Z.sibling;if(ee!==null)et=ee;else{var ce=Z.return;ce!==null?(et=ce,Hf(ce)):et=null}break t}}vt=0,Yn=null,go(s,u,C,5);break;case 6:vt=0,Yn=null,go(s,u,C,6);break;case 8:Qg(),Ft=6;break e;default:throw Error(r(462))}}pz();break}catch(ge){_2(s,ge)}while(!0);return hi=Ka=null,B.H=y,B.A=E,bt=p,et!==null?0:(Nt=null,at=0,df(),Ft)}function pz(){for(;et!==null&&!me();)S2(et)}function S2(s){var u=XA(s.alternate,s,xi);s.memoizedProps=s.pendingProps,u===null?Hf(s):et=u}function E2(s){var u=s,p=u.alternate;switch(u.tag){case 15:case 0:u=VA(p,u,u.pendingProps,u.type,void 0,at);break;case 11:u=VA(p,u,u.pendingProps,u.type.render,u.ref,at);break;case 5:mg(u);default:QA(p,u),u=et=kk(u,xi),u=XA(p,u,xi)}s.memoizedProps=s.pendingProps,u===null?Hf(s):et=u}function go(s,u,p,y){hi=Ka=null,mg(u),so=null,Xl=0;var E=u.return;try{if(rz(s,E,u,p,at)){Ft=1,If(s,ur(p,s.current)),et=null;return}}catch(C){if(E!==null)throw et=E,C;Ft=1,If(s,ur(p,s.current)),et=null;return}u.flags&32768?(pt||y===1?s=!0:co||(at&536870912)!==0?s=!1:(sa=s=!0,(y===2||y===9||y===3||y===6)&&(y=hr.current,y!==null&&y.tag===13&&(y.flags|=16384))),k2(u,s)):Hf(u)}function Hf(s){var u=s;do{if((u.flags&32768)!==0){k2(u,sa);return}s=u.return;var p=az(u.alternate,u,xi);if(p!==null){et=p;return}if(u=u.sibling,u!==null){et=u;return}et=u=s}while(u!==null);Ft===0&&(Ft=5)}function k2(s,u){do{var p=sz(s.alternate,s);if(p!==null){p.flags&=32767,et=p;return}if(p=s.return,p!==null&&(p.flags|=32768,p.subtreeFlags=0,p.deletions=null),!u&&(s=s.sibling,s!==null)){et=s;return}et=s=p}while(s!==null);Ft=6,et=null}function A2(s,u,p,y,E,C,F,Z,ee){s.cancelPendingCommit=null;do Gf();while(dn!==0);if((bt&6)!==0)throw Error(r(327));if(u!==null){if(u===s.current)throw Error(r(177));if(C=u.lanes|u.childLanes,C|=Vm,bm(s,p,C,F,Z,ee),s===Nt&&(et=Nt=null,at=0),ho=u,ua=s,po=p,Kg=C,Xg=E,g2=y,(u.subtreeFlags&10256)!==0||(u.flags&10256)!==0?(s.callbackNode=null,s.callbackPriority=0,bz(He,function(){return R2(),null})):(s.callbackNode=null,s.callbackPriority=0),y=(u.flags&13878)!==0,(u.subtreeFlags&13878)!==0||y){y=B.T,B.T=null,E=G.p,G.p=2,F=bt,bt|=4;try{oz(s,u,p)}finally{bt=F,G.p=E,B.T=y}}dn=1,T2(),C2(),O2()}}function T2(){if(dn===1){dn=0;var s=ua,u=ho,p=(u.flags&13878)!==0;if((u.subtreeFlags&13878)!==0||p){p=B.T,B.T=null;var y=G.p;G.p=2;var E=bt;bt|=4;try{u2(u,s);var C=dy,F=mk(s.containerInfo),Z=C.focusedElem,ee=C.selectionRange;if(F!==Z&&Z&&Z.ownerDocument&&pk(Z.ownerDocument.documentElement,Z)){if(ee!==null&&zm(Z)){var ce=ee.start,ge=ee.end;if(ge===void 0&&(ge=ce),"selectionStart"in Z)Z.selectionStart=ce,Z.selectionEnd=Math.min(ge,Z.value.length);else{var ve=Z.ownerDocument||document,de=ve&&ve.defaultView||window;if(de.getSelection){var he=de.getSelection(),Fe=Z.textContent.length,Le=Math.min(ee.start,Fe),Et=ee.end===void 0?Le:Math.min(ee.end,Fe);!he.extend&&Le>Et&&(F=Et,Et=Le,Le=F);var oe=hk(Z,Le),ie=hk(Z,Et);if(oe&&ie&&(he.rangeCount!==1||he.anchorNode!==oe.node||he.anchorOffset!==oe.offset||he.focusNode!==ie.node||he.focusOffset!==ie.offset)){var ue=ve.createRange();ue.setStart(oe.node,oe.offset),he.removeAllRanges(),Le>Et?(he.addRange(ue),he.extend(ie.node,ie.offset)):(ue.setEnd(ie.node,ie.offset),he.addRange(ue))}}}}for(ve=[],he=Z;he=he.parentNode;)he.nodeType===1&&ve.push({element:he,left:he.scrollLeft,top:he.scrollTop});for(typeof Z.focus=="function"&&Z.focus(),Z=0;Z<ve.length;Z++){var ye=ve[Z];ye.element.scrollLeft=ye.left,ye.element.scrollTop=ye.top}}id=!!fy,dy=fy=null}finally{bt=E,G.p=y,B.T=p}}s.current=u,dn=2}}function C2(){if(dn===2){dn=0;var s=ua,u=ho,p=(u.flags&8772)!==0;if((u.subtreeFlags&8772)!==0||p){p=B.T,B.T=null;var y=G.p;G.p=2;var E=bt;bt|=4;try{a2(s,u.alternate,u)}finally{bt=E,G.p=y,B.T=p}}dn=3}}function O2(){if(dn===4||dn===3){dn=0,xe();var s=ua,u=ho,p=po,y=g2;(u.subtreeFlags&10256)!==0||(u.flags&10256)!==0?dn=5:(dn=0,ho=ua=null,N2(s,s.pendingLanes));var E=s.pendingLanes;if(E===0&&(la=null),vl(p),u=u.stateNode,_e&&typeof _e.onCommitFiberRoot=="function")try{_e.onCommitFiberRoot(pe,u,void 0,(u.current.flags&128)===128)}catch{}if(y!==null){u=B.T,E=G.p,G.p=2,B.T=null;try{for(var C=s.onRecoverableError,F=0;F<y.length;F++){var Z=y[F];C(Z.value,{componentStack:Z.stack})}}finally{B.T=u,G.p=E}}(po&3)!==0&&Gf(),Vr(s),E=s.pendingLanes,(p&4194090)!==0&&(E&42)!==0?s===Wg?au++:(au=0,Wg=s):au=0,su(0)}}function N2(s,u){(s.pooledCacheLanes&=u)===0&&(u=s.pooledCache,u!=null&&(s.pooledCache=null,zl(u)))}function Gf(s){return T2(),C2(),O2(),R2()}function R2(){if(dn!==5)return!1;var s=ua,u=Kg;Kg=0;var p=vl(po),y=B.T,E=G.p;try{G.p=32>p?32:p,B.T=null,p=Xg,Xg=null;var C=ua,F=po;if(dn=0,ho=ua=null,po=0,(bt&6)!==0)throw Error(r(331));var Z=bt;if(bt|=4,p2(C.current),f2(C,C.current,F,p),bt=Z,su(0,!1),_e&&typeof _e.onPostCommitFiberRoot=="function")try{_e.onPostCommitFiberRoot(pe,C)}catch{}return!0}finally{G.p=E,B.T=y,N2(s,u)}}function j2(s,u,p){u=ur(p,u),u=Og(s.stateNode,u,2),s=Ji(s,u,2),s!==null&&(za(s,2),Vr(s))}function At(s,u,p){if(s.tag===3)j2(s,s,p);else for(;u!==null;){if(u.tag===3){j2(u,s,p);break}else if(u.tag===1){var y=u.stateNode;if(typeof u.type.getDerivedStateFromError=="function"||typeof y.componentDidCatch=="function"&&(la===null||!la.has(y))){s=ur(p,s),p=IA(2),y=Ji(u,p,2),y!==null&&(PA(p,y,u,s),za(y,2),Vr(y));break}}u=u.return}}function ty(s,u,p){var y=s.pingCache;if(y===null){y=s.pingCache=new cz;var E=new Set;y.set(u,E)}else E=y.get(u),E===void 0&&(E=new Set,y.set(u,E));E.has(p)||(Hg=!0,E.add(p),s=mz.bind(null,s,u,p),u.then(s,s))}function mz(s,u,p){var y=s.pingCache;y!==null&&y.delete(u),s.pingedLanes|=s.suspendedLanes&p,s.warmLanes&=~p,Nt===s&&(at&p)===p&&(Ft===4||Ft===3&&(at&62914560)===at&&300>we()-Zg?(bt&2)===0&&mo(s,0):Gg|=p,fo===at&&(fo=0)),Vr(s)}function M2(s,u){u===0&&(u=Gc()),s=Xs(s,u),s!==null&&(za(s,u),Vr(s))}function gz(s){var u=s.memoizedState,p=0;u!==null&&(p=u.retryLane),M2(s,p)}function yz(s,u){var p=0;switch(s.tag){case 13:var y=s.stateNode,E=s.memoizedState;E!==null&&(p=E.retryLane);break;case 19:y=s.stateNode;break;case 22:y=s.stateNode._retryCache;break;default:throw Error(r(314))}y!==null&&y.delete(u),M2(s,p)}function bz(s,u){return se(s,u)}var Yf=null,yo=null,ny=!1,Zf=!1,ry=!1,ns=0;function Vr(s){s!==yo&&s.next===null&&(yo===null?Yf=yo=s:yo=yo.next=s),Zf=!0,ny||(ny=!0,_z())}function su(s,u){if(!ry&&Zf){ry=!0;do for(var p=!1,y=Yf;y!==null;){if(s!==0){var E=y.pendingLanes;if(E===0)var C=0;else{var F=y.suspendedLanes,Z=y.pingedLanes;C=(1<<31-je(42|s)+1)-1,C&=E&~(F&~Z),C=C&201326741?C&201326741|1:C?C|2:0}C!==0&&(p=!0,P2(y,C))}else C=at,C=Yt(y,y===Nt?C:0,y.cancelPendingCommit!==null||y.timeoutHandle!==-1),(C&3)===0||On(y,C)||(p=!0,P2(y,C));y=y.next}while(p);ry=!1}}function vz(){$2()}function $2(){Zf=ny=!1;var s=0;ns!==0&&(Cz()&&(s=ns),ns=0);for(var u=we(),p=null,y=Yf;y!==null;){var E=y.next,C=D2(y,u);C===0?(y.next=null,p===null?Yf=E:p.next=E,E===null&&(yo=p)):(p=y,(s!==0||(C&3)!==0)&&(Zf=!0)),y=E}su(s)}function D2(s,u){for(var p=s.suspendedLanes,y=s.pingedLanes,E=s.expirationTimes,C=s.pendingLanes&-62914561;0<C;){var F=31-je(C),Z=1<<F,ee=E[F];ee===-1?((Z&p)===0||(Z&y)!==0)&&(E[F]=Bn(Z,u)):ee<=u&&(s.expiredLanes|=Z),C&=~Z}if(u=Nt,p=at,p=Yt(s,s===u?p:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),y=s.callbackNode,p===0||s===u&&(vt===2||vt===9)||s.cancelPendingCommit!==null)return y!==null&&y!==null&&fe(y),s.callbackNode=null,s.callbackPriority=0;if((p&3)===0||On(s,p)){if(u=p&-p,u===s.callbackPriority)return u;switch(y!==null&&fe(y),vl(p)){case 2:case 8:p=We;break;case 32:p=He;break;case 268435456:p=Be;break;default:p=He}return y=I2.bind(null,s),p=se(p,y),s.callbackPriority=u,s.callbackNode=p,u}return y!==null&&y!==null&&fe(y),s.callbackPriority=2,s.callbackNode=null,2}function I2(s,u){if(dn!==0&&dn!==5)return s.callbackNode=null,s.callbackPriority=0,null;var p=s.callbackNode;if(Gf()&&s.callbackNode!==p)return null;var y=at;return y=Yt(s,s===Nt?y:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),y===0?null:(b2(s,y,u),D2(s,we()),s.callbackNode!=null&&s.callbackNode===p?I2.bind(null,s):null)}function P2(s,u){if(Gf())return null;b2(s,u,!0)}function _z(){Nz(function(){(bt&6)!==0?se(qe,vz):$2()})}function iy(){return ns===0&&(ns=Hc()),ns}function L2(s){return s==null||typeof s=="symbol"||typeof s=="boolean"?null:typeof s=="function"?s:af(""+s)}function z2(s,u){var p=u.ownerDocument.createElement("input");return p.name=u.name,p.value=u.value,s.id&&p.setAttribute("form",s.id),u.parentNode.insertBefore(p,u),s=new FormData(s),p.parentNode.removeChild(p),s}function xz(s,u,p,y,E){if(u==="submit"&&p&&p.stateNode===E){var C=L2((E[yn]||null).action),F=y.submitter;F&&(u=(u=F[yn]||null)?L2(u.formAction):F.getAttribute("formAction"),u!==null&&(C=u,F=null));var Z=new uf("action","action",null,y,E);s.push({event:Z,listeners:[{instance:null,listener:function(){if(y.defaultPrevented){if(ns!==0){var ee=F?z2(E,F):new FormData(E);Eg(p,{pending:!0,data:ee,method:E.method,action:C},null,ee)}}else typeof C=="function"&&(Z.preventDefault(),ee=F?z2(E,F):new FormData(E),Eg(p,{pending:!0,data:ee,method:E.method,action:C},C,ee))},currentTarget:E}]})}}for(var ay=0;ay<Um.length;ay++){var sy=Um[ay],wz=sy.toLowerCase(),Sz=sy[0].toUpperCase()+sy.slice(1);wr(wz,"on"+Sz)}wr(bk,"onAnimationEnd"),wr(vk,"onAnimationIteration"),wr(_k,"onAnimationStart"),wr("dblclick","onDoubleClick"),wr("focusin","onFocus"),wr("focusout","onBlur"),wr(q8,"onTransitionRun"),wr(F8,"onTransitionStart"),wr(B8,"onTransitionCancel"),wr(xk,"onTransitionEnd"),Gi("onMouseEnter",["mouseout","mouseover"]),Gi("onMouseLeave",["mouseout","mouseover"]),Gi("onPointerEnter",["pointerout","pointerover"]),Gi("onPointerLeave",["pointerout","pointerover"]),li("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),li("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),li("onBeforeInput",["compositionend","keypress","textInput","paste"]),li("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),li("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),li("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ou="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Ez=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(ou));function q2(s,u){u=(u&4)!==0;for(var p=0;p<s.length;p++){var y=s[p],E=y.event;y=y.listeners;e:{var C=void 0;if(u)for(var F=y.length-1;0<=F;F--){var Z=y[F],ee=Z.instance,ce=Z.currentTarget;if(Z=Z.listener,ee!==C&&E.isPropagationStopped())break e;C=Z,E.currentTarget=ce;try{C(E)}catch(ge){Df(ge)}E.currentTarget=null,C=ee}else for(F=0;F<y.length;F++){if(Z=y[F],ee=Z.instance,ce=Z.currentTarget,Z=Z.listener,ee!==C&&E.isPropagationStopped())break e;C=Z,E.currentTarget=ce;try{C(E)}catch(ge){Df(ge)}E.currentTarget=null,C=ee}}}}function tt(s,u){var p=u[_l];p===void 0&&(p=u[_l]=new Set);var y=s+"__bubble";p.has(y)||(F2(u,s,2,!1),p.add(y))}function oy(s,u,p){var y=0;u&&(y|=4),F2(p,s,y,u)}var Kf="_reactListening"+Math.random().toString(36).slice(2);function ly(s){if(!s[Kf]){s[Kf]=!0,Xc.forEach(function(p){p!=="selectionchange"&&(Ez.has(p)||oy(p,!1,s),oy(p,!0,s))});var u=s.nodeType===9?s:s.ownerDocument;u===null||u[Kf]||(u[Kf]=!0,oy("selectionchange",!1,u))}}function F2(s,u,p,y){switch(fT(u)){case 2:var E=Wz;break;case 8:E=Qz;break;default:E=wy}p=E.bind(null,u,p,s),E=void 0,!Nm||u!=="touchstart"&&u!=="touchmove"&&u!=="wheel"||(E=!0),y?E!==void 0?s.addEventListener(u,p,{capture:!0,passive:E}):s.addEventListener(u,p,!0):E!==void 0?s.addEventListener(u,p,{passive:E}):s.addEventListener(u,p,!1)}function uy(s,u,p,y,E){var C=y;if((u&1)===0&&(u&2)===0&&y!==null)e:for(;;){if(y===null)return;var F=y.tag;if(F===3||F===4){var Z=y.stateNode.containerInfo;if(Z===E)break;if(F===4)for(F=y.return;F!==null;){var ee=F.tag;if((ee===3||ee===4)&&F.stateNode.containerInfo===E)return;F=F.return}for(;Z!==null;){if(F=si(Z),F===null)return;if(ee=F.tag,ee===5||ee===6||ee===26||ee===27){y=C=F;continue e}Z=Z.parentNode}}y=y.return}ZE(function(){var ce=C,ge=Cm(p),ve=[];e:{var de=wk.get(s);if(de!==void 0){var he=uf,Fe=s;switch(s){case"keypress":if(of(p)===0)break e;case"keydown":case"keyup":he=b8;break;case"focusin":Fe="focus",he=$m;break;case"focusout":Fe="blur",he=$m;break;case"beforeblur":case"afterblur":he=$m;break;case"click":if(p.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":he=WE;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":he=s8;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":he=x8;break;case bk:case vk:case _k:he=u8;break;case xk:he=S8;break;case"scroll":case"scrollend":he=i8;break;case"wheel":he=k8;break;case"copy":case"cut":case"paste":he=f8;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":he=JE;break;case"toggle":case"beforetoggle":he=T8}var Le=(u&4)!==0,Et=!Le&&(s==="scroll"||s==="scrollend"),oe=Le?de!==null?de+"Capture":null:de;Le=[];for(var ie=ce,ue;ie!==null;){var ye=ie;if(ue=ye.stateNode,ye=ye.tag,ye!==5&&ye!==26&&ye!==27||ue===null||oe===null||(ye=Al(ie,oe),ye!=null&&Le.push(lu(ie,ye,ue))),Et)break;ie=ie.return}0<Le.length&&(de=new he(de,Fe,null,p,ge),ve.push({event:de,listeners:Le}))}}if((u&7)===0){e:{if(de=s==="mouseover"||s==="pointerover",he=s==="mouseout"||s==="pointerout",de&&p!==Tm&&(Fe=p.relatedTarget||p.fromElement)&&(si(Fe)||Fe[Ui]))break e;if((he||de)&&(de=ge.window===ge?ge:(de=ge.ownerDocument)?de.defaultView||de.parentWindow:window,he?(Fe=p.relatedTarget||p.toElement,he=ce,Fe=Fe?si(Fe):null,Fe!==null&&(Et=a(Fe),Le=Fe.tag,Fe!==Et||Le!==5&&Le!==27&&Le!==6)&&(Fe=null)):(he=null,Fe=ce),he!==Fe)){if(Le=WE,ye="onMouseLeave",oe="onMouseEnter",ie="mouse",(s==="pointerout"||s==="pointerover")&&(Le=JE,ye="onPointerLeave",oe="onPointerEnter",ie="pointer"),Et=he==null?de:Vi(he),ue=Fe==null?de:Vi(Fe),de=new Le(ye,ie+"leave",he,p,ge),de.target=Et,de.relatedTarget=ue,ye=null,si(ge)===ce&&(Le=new Le(oe,ie+"enter",Fe,p,ge),Le.target=ue,Le.relatedTarget=Et,ye=Le),Et=ye,he&&Fe)t:{for(Le=he,oe=Fe,ie=0,ue=Le;ue;ue=bo(ue))ie++;for(ue=0,ye=oe;ye;ye=bo(ye))ue++;for(;0<ie-ue;)Le=bo(Le),ie--;for(;0<ue-ie;)oe=bo(oe),ue--;for(;ie--;){if(Le===oe||oe!==null&&Le===oe.alternate)break t;Le=bo(Le),oe=bo(oe)}Le=null}else Le=null;he!==null&&B2(ve,de,he,Le,!1),Fe!==null&&Et!==null&&B2(ve,Et,Fe,Le,!0)}}e:{if(de=ce?Vi(ce):window,he=de.nodeName&&de.nodeName.toLowerCase(),he==="select"||he==="input"&&de.type==="file")var Ce=ok;else if(ak(de))if(lk)Ce=P8;else{Ce=D8;var Qe=$8}else he=de.nodeName,!he||he.toLowerCase()!=="input"||de.type!=="checkbox"&&de.type!=="radio"?ce&&Am(ce.elementType)&&(Ce=ok):Ce=I8;if(Ce&&(Ce=Ce(s,ce))){sk(ve,Ce,p,ge);break e}Qe&&Qe(s,de,ce),s==="focusout"&&ce&&de.type==="number"&&ce.memoizedProps.value!=null&&km(de,"number",de.value)}switch(Qe=ce?Vi(ce):window,s){case"focusin":(ak(Qe)||Qe.contentEditable==="true")&&(Ys=Qe,qm=ce,$l=null);break;case"focusout":$l=qm=Ys=null;break;case"mousedown":Fm=!0;break;case"contextmenu":case"mouseup":case"dragend":Fm=!1,gk(ve,p,ge);break;case"selectionchange":if(z8)break;case"keydown":case"keyup":gk(ve,p,ge)}var Me;if(Im)e:{switch(s){case"compositionstart":var ze="onCompositionStart";break e;case"compositionend":ze="onCompositionEnd";break e;case"compositionupdate":ze="onCompositionUpdate";break e}ze=void 0}else Gs?rk(s,p)&&(ze="onCompositionEnd"):s==="keydown"&&p.keyCode===229&&(ze="onCompositionStart");ze&&(ek&&p.locale!=="ko"&&(Gs||ze!=="onCompositionStart"?ze==="onCompositionEnd"&&Gs&&(Me=KE()):(Ki=ge,Rm="value"in Ki?Ki.value:Ki.textContent,Gs=!0)),Qe=Xf(ce,ze),0<Qe.length&&(ze=new QE(ze,s,null,p,ge),ve.push({event:ze,listeners:Qe}),Me?ze.data=Me:(Me=ik(p),Me!==null&&(ze.data=Me)))),(Me=O8?N8(s,p):R8(s,p))&&(ze=Xf(ce,"onBeforeInput"),0<ze.length&&(Qe=new QE("onBeforeInput","beforeinput",null,p,ge),ve.push({event:Qe,listeners:ze}),Qe.data=Me)),xz(ve,s,ce,p,ge)}q2(ve,u)})}function lu(s,u,p){return{instance:s,listener:u,currentTarget:p}}function Xf(s,u){for(var p=u+"Capture",y=[];s!==null;){var E=s,C=E.stateNode;if(E=E.tag,E!==5&&E!==26&&E!==27||C===null||(E=Al(s,p),E!=null&&y.unshift(lu(s,E,C)),E=Al(s,u),E!=null&&y.push(lu(s,E,C))),s.tag===3)return y;s=s.return}return[]}function bo(s){if(s===null)return null;do s=s.return;while(s&&s.tag!==5&&s.tag!==27);return s||null}function B2(s,u,p,y,E){for(var C=u._reactName,F=[];p!==null&&p!==y;){var Z=p,ee=Z.alternate,ce=Z.stateNode;if(Z=Z.tag,ee!==null&&ee===y)break;Z!==5&&Z!==26&&Z!==27||ce===null||(ee=ce,E?(ce=Al(p,C),ce!=null&&F.unshift(lu(p,ce,ee))):E||(ce=Al(p,C),ce!=null&&F.push(lu(p,ce,ee)))),p=p.return}F.length!==0&&s.push({event:u,listeners:F})}var kz=/\r\n?/g,Az=/\u0000|\uFFFD/g;function U2(s){return(typeof s=="string"?s:""+s).replace(kz,`
|
|
49
|
+
`).replace(Az,"")}function V2(s,u){return u=U2(u),U2(s)===u}function Wf(){}function St(s,u,p,y,E,C){switch(p){case"children":typeof y=="string"?u==="body"||u==="textarea"&&y===""||Us(s,y):(typeof y=="number"||typeof y=="bigint")&&u!=="body"&&Us(s,""+y);break;case"className":Ls(s,"class",y);break;case"tabIndex":Ls(s,"tabindex",y);break;case"dir":case"role":case"viewBox":case"width":case"height":Ls(s,p,y);break;case"style":GE(s,y,C);break;case"data":if(u!=="object"){Ls(s,"data",y);break}case"src":case"href":if(y===""&&(u!=="a"||p!=="href")){s.removeAttribute(p);break}if(y==null||typeof y=="function"||typeof y=="symbol"||typeof y=="boolean"){s.removeAttribute(p);break}y=af(""+y),s.setAttribute(p,y);break;case"action":case"formAction":if(typeof y=="function"){s.setAttribute(p,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof C=="function"&&(p==="formAction"?(u!=="input"&&St(s,u,"name",E.name,E,null),St(s,u,"formEncType",E.formEncType,E,null),St(s,u,"formMethod",E.formMethod,E,null),St(s,u,"formTarget",E.formTarget,E,null)):(St(s,u,"encType",E.encType,E,null),St(s,u,"method",E.method,E,null),St(s,u,"target",E.target,E,null)));if(y==null||typeof y=="symbol"||typeof y=="boolean"){s.removeAttribute(p);break}y=af(""+y),s.setAttribute(p,y);break;case"onClick":y!=null&&(s.onclick=Wf);break;case"onScroll":y!=null&&tt("scroll",s);break;case"onScrollEnd":y!=null&&tt("scrollend",s);break;case"dangerouslySetInnerHTML":if(y!=null){if(typeof y!="object"||!("__html"in y))throw Error(r(61));if(p=y.__html,p!=null){if(E.children!=null)throw Error(r(60));s.innerHTML=p}}break;case"multiple":s.multiple=y&&typeof y!="function"&&typeof y!="symbol";break;case"muted":s.muted=y&&typeof y!="function"&&typeof y!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(y==null||typeof y=="function"||typeof y=="boolean"||typeof y=="symbol"){s.removeAttribute("xlink:href");break}p=af(""+y),s.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",p);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":y!=null&&typeof y!="function"&&typeof y!="symbol"?s.setAttribute(p,""+y):s.removeAttribute(p);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":y&&typeof y!="function"&&typeof y!="symbol"?s.setAttribute(p,""):s.removeAttribute(p);break;case"capture":case"download":y===!0?s.setAttribute(p,""):y!==!1&&y!=null&&typeof y!="function"&&typeof y!="symbol"?s.setAttribute(p,y):s.removeAttribute(p);break;case"cols":case"rows":case"size":case"span":y!=null&&typeof y!="function"&&typeof y!="symbol"&&!isNaN(y)&&1<=y?s.setAttribute(p,y):s.removeAttribute(p);break;case"rowSpan":case"start":y==null||typeof y=="function"||typeof y=="symbol"||isNaN(y)?s.removeAttribute(p):s.setAttribute(p,y);break;case"popover":tt("beforetoggle",s),tt("toggle",s),Ps(s,"popover",y);break;case"xlinkActuate":xr(s,"http://www.w3.org/1999/xlink","xlink:actuate",y);break;case"xlinkArcrole":xr(s,"http://www.w3.org/1999/xlink","xlink:arcrole",y);break;case"xlinkRole":xr(s,"http://www.w3.org/1999/xlink","xlink:role",y);break;case"xlinkShow":xr(s,"http://www.w3.org/1999/xlink","xlink:show",y);break;case"xlinkTitle":xr(s,"http://www.w3.org/1999/xlink","xlink:title",y);break;case"xlinkType":xr(s,"http://www.w3.org/1999/xlink","xlink:type",y);break;case"xmlBase":xr(s,"http://www.w3.org/XML/1998/namespace","xml:base",y);break;case"xmlLang":xr(s,"http://www.w3.org/XML/1998/namespace","xml:lang",y);break;case"xmlSpace":xr(s,"http://www.w3.org/XML/1998/namespace","xml:space",y);break;case"is":Ps(s,"is",y);break;case"innerText":case"textContent":break;default:(!(2<p.length)||p[0]!=="o"&&p[0]!=="O"||p[1]!=="n"&&p[1]!=="N")&&(p=n8.get(p)||p,Ps(s,p,y))}}function cy(s,u,p,y,E,C){switch(p){case"style":GE(s,y,C);break;case"dangerouslySetInnerHTML":if(y!=null){if(typeof y!="object"||!("__html"in y))throw Error(r(61));if(p=y.__html,p!=null){if(E.children!=null)throw Error(r(60));s.innerHTML=p}}break;case"children":typeof y=="string"?Us(s,y):(typeof y=="number"||typeof y=="bigint")&&Us(s,""+y);break;case"onScroll":y!=null&&tt("scroll",s);break;case"onScrollEnd":y!=null&&tt("scrollend",s);break;case"onClick":y!=null&&(s.onclick=Wf);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Wc.hasOwnProperty(p))e:{if(p[0]==="o"&&p[1]==="n"&&(E=p.endsWith("Capture"),u=p.slice(2,E?p.length-7:void 0),C=s[yn]||null,C=C!=null?C[p]:null,typeof C=="function"&&s.removeEventListener(u,C,E),typeof y=="function")){typeof C!="function"&&C!==null&&(p in s?s[p]=null:s.hasAttribute(p)&&s.removeAttribute(p)),s.addEventListener(u,y,E);break e}p in s?s[p]=y:y===!0?s.setAttribute(p,""):Ps(s,p,y)}}}function hn(s,u,p){switch(u){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":tt("error",s),tt("load",s);var y=!1,E=!1,C;for(C in p)if(p.hasOwnProperty(C)){var F=p[C];if(F!=null)switch(C){case"src":y=!0;break;case"srcSet":E=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,u));default:St(s,u,C,F,p,null)}}E&&St(s,u,"srcSet",p.srcSet,p,null),y&&St(s,u,"src",p.src,p,null);return;case"input":tt("invalid",s);var Z=C=F=E=null,ee=null,ce=null;for(y in p)if(p.hasOwnProperty(y)){var ge=p[y];if(ge!=null)switch(y){case"name":E=ge;break;case"type":F=ge;break;case"checked":ee=ge;break;case"defaultChecked":ce=ge;break;case"value":C=ge;break;case"defaultValue":Z=ge;break;case"children":case"dangerouslySetInnerHTML":if(ge!=null)throw Error(r(137,u));break;default:St(s,u,y,ge,p,null)}}BE(s,C,Z,ee,ce,F,E,!1),qs(s);return;case"select":tt("invalid",s),y=F=C=null;for(E in p)if(p.hasOwnProperty(E)&&(Z=p[E],Z!=null))switch(E){case"value":C=Z;break;case"defaultValue":F=Z;break;case"multiple":y=Z;default:St(s,u,E,Z,p,null)}u=C,p=F,s.multiple=!!y,u!=null?Bs(s,!!y,u,!1):p!=null&&Bs(s,!!y,p,!0);return;case"textarea":tt("invalid",s),C=E=y=null;for(F in p)if(p.hasOwnProperty(F)&&(Z=p[F],Z!=null))switch(F){case"value":y=Z;break;case"defaultValue":E=Z;break;case"children":C=Z;break;case"dangerouslySetInnerHTML":if(Z!=null)throw Error(r(91));break;default:St(s,u,F,Z,p,null)}VE(s,y,E,C),qs(s);return;case"option":for(ee in p)if(p.hasOwnProperty(ee)&&(y=p[ee],y!=null))switch(ee){case"selected":s.selected=y&&typeof y!="function"&&typeof y!="symbol";break;default:St(s,u,ee,y,p,null)}return;case"dialog":tt("beforetoggle",s),tt("toggle",s),tt("cancel",s),tt("close",s);break;case"iframe":case"object":tt("load",s);break;case"video":case"audio":for(y=0;y<ou.length;y++)tt(ou[y],s);break;case"image":tt("error",s),tt("load",s);break;case"details":tt("toggle",s);break;case"embed":case"source":case"link":tt("error",s),tt("load",s);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(ce in p)if(p.hasOwnProperty(ce)&&(y=p[ce],y!=null))switch(ce){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,u));default:St(s,u,ce,y,p,null)}return;default:if(Am(u)){for(ge in p)p.hasOwnProperty(ge)&&(y=p[ge],y!==void 0&&cy(s,u,ge,y,p,void 0));return}}for(Z in p)p.hasOwnProperty(Z)&&(y=p[Z],y!=null&&St(s,u,Z,y,p,null))}function Tz(s,u,p,y){switch(u){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var E=null,C=null,F=null,Z=null,ee=null,ce=null,ge=null;for(he in p){var ve=p[he];if(p.hasOwnProperty(he)&&ve!=null)switch(he){case"checked":break;case"value":break;case"defaultValue":ee=ve;default:y.hasOwnProperty(he)||St(s,u,he,null,y,ve)}}for(var de in y){var he=y[de];if(ve=p[de],y.hasOwnProperty(de)&&(he!=null||ve!=null))switch(de){case"type":C=he;break;case"name":E=he;break;case"checked":ce=he;break;case"defaultChecked":ge=he;break;case"value":F=he;break;case"defaultValue":Z=he;break;case"children":case"dangerouslySetInnerHTML":if(he!=null)throw Error(r(137,u));break;default:he!==ve&&St(s,u,de,he,y,ve)}}Fs(s,F,Z,ee,ce,ge,C,E);return;case"select":he=F=Z=de=null;for(C in p)if(ee=p[C],p.hasOwnProperty(C)&&ee!=null)switch(C){case"value":break;case"multiple":he=ee;default:y.hasOwnProperty(C)||St(s,u,C,null,y,ee)}for(E in y)if(C=y[E],ee=p[E],y.hasOwnProperty(E)&&(C!=null||ee!=null))switch(E){case"value":de=C;break;case"defaultValue":Z=C;break;case"multiple":F=C;default:C!==ee&&St(s,u,E,C,y,ee)}u=Z,p=F,y=he,de!=null?Bs(s,!!p,de,!1):!!y!=!!p&&(u!=null?Bs(s,!!p,u,!0):Bs(s,!!p,p?[]:"",!1));return;case"textarea":he=de=null;for(Z in p)if(E=p[Z],p.hasOwnProperty(Z)&&E!=null&&!y.hasOwnProperty(Z))switch(Z){case"value":break;case"children":break;default:St(s,u,Z,null,y,E)}for(F in y)if(E=y[F],C=p[F],y.hasOwnProperty(F)&&(E!=null||C!=null))switch(F){case"value":de=E;break;case"defaultValue":he=E;break;case"children":break;case"dangerouslySetInnerHTML":if(E!=null)throw Error(r(91));break;default:E!==C&&St(s,u,F,E,y,C)}UE(s,de,he);return;case"option":for(var Fe in p)if(de=p[Fe],p.hasOwnProperty(Fe)&&de!=null&&!y.hasOwnProperty(Fe))switch(Fe){case"selected":s.selected=!1;break;default:St(s,u,Fe,null,y,de)}for(ee in y)if(de=y[ee],he=p[ee],y.hasOwnProperty(ee)&&de!==he&&(de!=null||he!=null))switch(ee){case"selected":s.selected=de&&typeof de!="function"&&typeof de!="symbol";break;default:St(s,u,ee,de,y,he)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var Le in p)de=p[Le],p.hasOwnProperty(Le)&&de!=null&&!y.hasOwnProperty(Le)&&St(s,u,Le,null,y,de);for(ce in y)if(de=y[ce],he=p[ce],y.hasOwnProperty(ce)&&de!==he&&(de!=null||he!=null))switch(ce){case"children":case"dangerouslySetInnerHTML":if(de!=null)throw Error(r(137,u));break;default:St(s,u,ce,de,y,he)}return;default:if(Am(u)){for(var Et in p)de=p[Et],p.hasOwnProperty(Et)&&de!==void 0&&!y.hasOwnProperty(Et)&&cy(s,u,Et,void 0,y,de);for(ge in y)de=y[ge],he=p[ge],!y.hasOwnProperty(ge)||de===he||de===void 0&&he===void 0||cy(s,u,ge,de,y,he);return}}for(var oe in p)de=p[oe],p.hasOwnProperty(oe)&&de!=null&&!y.hasOwnProperty(oe)&&St(s,u,oe,null,y,de);for(ve in y)de=y[ve],he=p[ve],!y.hasOwnProperty(ve)||de===he||de==null&&he==null||St(s,u,ve,de,y,he)}var fy=null,dy=null;function Qf(s){return s.nodeType===9?s:s.ownerDocument}function H2(s){switch(s){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function G2(s,u){if(s===0)switch(u){case"svg":return 1;case"math":return 2;default:return 0}return s===1&&u==="foreignObject"?0:s}function hy(s,u){return s==="textarea"||s==="noscript"||typeof u.children=="string"||typeof u.children=="number"||typeof u.children=="bigint"||typeof u.dangerouslySetInnerHTML=="object"&&u.dangerouslySetInnerHTML!==null&&u.dangerouslySetInnerHTML.__html!=null}var py=null;function Cz(){var s=window.event;return s&&s.type==="popstate"?s===py?!1:(py=s,!0):(py=null,!1)}var Y2=typeof setTimeout=="function"?setTimeout:void 0,Oz=typeof clearTimeout=="function"?clearTimeout:void 0,Z2=typeof Promise=="function"?Promise:void 0,Nz=typeof queueMicrotask=="function"?queueMicrotask:typeof Z2<"u"?function(s){return Z2.resolve(null).then(s).catch(Rz)}:Y2;function Rz(s){setTimeout(function(){throw s})}function fa(s){return s==="head"}function K2(s,u){var p=u,y=0,E=0;do{var C=p.nextSibling;if(s.removeChild(p),C&&C.nodeType===8)if(p=C.data,p==="/$"){if(0<y&&8>y){p=y;var F=s.ownerDocument;if(p&1&&uu(F.documentElement),p&2&&uu(F.body),p&4)for(p=F.head,uu(p),F=p.firstChild;F;){var Z=F.nextSibling,ee=F.nodeName;F[qa]||ee==="SCRIPT"||ee==="STYLE"||ee==="LINK"&&F.rel.toLowerCase()==="stylesheet"||p.removeChild(F),F=Z}}if(E===0){s.removeChild(C),yu(u);return}E--}else p==="$"||p==="$?"||p==="$!"?E++:y=p.charCodeAt(0)-48;else y=0;p=C}while(p);yu(u)}function my(s){var u=s.firstChild;for(u&&u.nodeType===10&&(u=u.nextSibling);u;){var p=u;switch(u=u.nextSibling,p.nodeName){case"HTML":case"HEAD":case"BODY":my(p),xl(p);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(p.rel.toLowerCase()==="stylesheet")continue}s.removeChild(p)}}function jz(s,u,p,y){for(;s.nodeType===1;){var E=p;if(s.nodeName.toLowerCase()!==u.toLowerCase()){if(!y&&(s.nodeName!=="INPUT"||s.type!=="hidden"))break}else if(y){if(!s[qa])switch(u){case"meta":if(!s.hasAttribute("itemprop"))break;return s;case"link":if(C=s.getAttribute("rel"),C==="stylesheet"&&s.hasAttribute("data-precedence"))break;if(C!==E.rel||s.getAttribute("href")!==(E.href==null||E.href===""?null:E.href)||s.getAttribute("crossorigin")!==(E.crossOrigin==null?null:E.crossOrigin)||s.getAttribute("title")!==(E.title==null?null:E.title))break;return s;case"style":if(s.hasAttribute("data-precedence"))break;return s;case"script":if(C=s.getAttribute("src"),(C!==(E.src==null?null:E.src)||s.getAttribute("type")!==(E.type==null?null:E.type)||s.getAttribute("crossorigin")!==(E.crossOrigin==null?null:E.crossOrigin))&&C&&s.hasAttribute("async")&&!s.hasAttribute("itemprop"))break;return s;default:return s}}else if(u==="input"&&s.type==="hidden"){var C=E.name==null?null:""+E.name;if(E.type==="hidden"&&s.getAttribute("name")===C)return s}else return s;if(s=Er(s.nextSibling),s===null)break}return null}function Mz(s,u,p){if(u==="")return null;for(;s.nodeType!==3;)if((s.nodeType!==1||s.nodeName!=="INPUT"||s.type!=="hidden")&&!p||(s=Er(s.nextSibling),s===null))return null;return s}function gy(s){return s.data==="$!"||s.data==="$?"&&s.ownerDocument.readyState==="complete"}function $z(s,u){var p=s.ownerDocument;if(s.data!=="$?"||p.readyState==="complete")u();else{var y=function(){u(),p.removeEventListener("DOMContentLoaded",y)};p.addEventListener("DOMContentLoaded",y),s._reactRetry=y}}function Er(s){for(;s!=null;s=s.nextSibling){var u=s.nodeType;if(u===1||u===3)break;if(u===8){if(u=s.data,u==="$"||u==="$!"||u==="$?"||u==="F!"||u==="F")break;if(u==="/$")return null}}return s}var yy=null;function X2(s){s=s.previousSibling;for(var u=0;s;){if(s.nodeType===8){var p=s.data;if(p==="$"||p==="$!"||p==="$?"){if(u===0)return s;u--}else p==="/$"&&u++}s=s.previousSibling}return null}function W2(s,u,p){switch(u=Qf(p),s){case"html":if(s=u.documentElement,!s)throw Error(r(452));return s;case"head":if(s=u.head,!s)throw Error(r(453));return s;case"body":if(s=u.body,!s)throw Error(r(454));return s;default:throw Error(r(451))}}function uu(s){for(var u=s.attributes;u.length;)s.removeAttributeNode(u[0]);xl(s)}var mr=new Map,Q2=new Set;function Jf(s){return typeof s.getRootNode=="function"?s.getRootNode():s.nodeType===9?s:s.ownerDocument}var wi=G.d;G.d={f:Dz,r:Iz,D:Pz,C:Lz,L:zz,m:qz,X:Bz,S:Fz,M:Uz};function Dz(){var s=wi.f(),u=Vf();return s||u}function Iz(s){var u=oi(s);u!==null&&u.tag===5&&u.type==="form"?bA(u):wi.r(s)}var vo=typeof document>"u"?null:document;function J2(s,u,p){var y=vo;if(y&&typeof u=="string"&&u){var E=Rn(u);E='link[rel="'+s+'"][href="'+E+'"]',typeof p=="string"&&(E+='[crossorigin="'+p+'"]'),Q2.has(E)||(Q2.add(E),s={rel:s,crossOrigin:p,href:u},y.querySelector(E)===null&&(u=y.createElement("link"),hn(u,"link",s),Zt(u),y.head.appendChild(u)))}}function Pz(s){wi.D(s),J2("dns-prefetch",s,null)}function Lz(s,u){wi.C(s,u),J2("preconnect",s,u)}function zz(s,u,p){wi.L(s,u,p);var y=vo;if(y&&s&&u){var E='link[rel="preload"][as="'+Rn(u)+'"]';u==="image"&&p&&p.imageSrcSet?(E+='[imagesrcset="'+Rn(p.imageSrcSet)+'"]',typeof p.imageSizes=="string"&&(E+='[imagesizes="'+Rn(p.imageSizes)+'"]')):E+='[href="'+Rn(s)+'"]';var C=E;switch(u){case"style":C=_o(s);break;case"script":C=xo(s)}mr.has(C)||(s=d({rel:"preload",href:u==="image"&&p&&p.imageSrcSet?void 0:s,as:u},p),mr.set(C,s),y.querySelector(E)!==null||u==="style"&&y.querySelector(cu(C))||u==="script"&&y.querySelector(fu(C))||(u=y.createElement("link"),hn(u,"link",s),Zt(u),y.head.appendChild(u)))}}function qz(s,u){wi.m(s,u);var p=vo;if(p&&s){var y=u&&typeof u.as=="string"?u.as:"script",E='link[rel="modulepreload"][as="'+Rn(y)+'"][href="'+Rn(s)+'"]',C=E;switch(y){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":C=xo(s)}if(!mr.has(C)&&(s=d({rel:"modulepreload",href:s},u),mr.set(C,s),p.querySelector(E)===null)){switch(y){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(p.querySelector(fu(C)))return}y=p.createElement("link"),hn(y,"link",s),Zt(y),p.head.appendChild(y)}}}function Fz(s,u,p){wi.S(s,u,p);var y=vo;if(y&&s){var E=Hi(y).hoistableStyles,C=_o(s);u=u||"default";var F=E.get(C);if(!F){var Z={loading:0,preload:null};if(F=y.querySelector(cu(C)))Z.loading=5;else{s=d({rel:"stylesheet",href:s,"data-precedence":u},p),(p=mr.get(C))&&by(s,p);var ee=F=y.createElement("link");Zt(ee),hn(ee,"link",s),ee._p=new Promise(function(ce,ge){ee.onload=ce,ee.onerror=ge}),ee.addEventListener("load",function(){Z.loading|=1}),ee.addEventListener("error",function(){Z.loading|=2}),Z.loading|=4,ed(F,u,y)}F={type:"stylesheet",instance:F,count:1,state:Z},E.set(C,F)}}}function Bz(s,u){wi.X(s,u);var p=vo;if(p&&s){var y=Hi(p).hoistableScripts,E=xo(s),C=y.get(E);C||(C=p.querySelector(fu(E)),C||(s=d({src:s,async:!0},u),(u=mr.get(E))&&vy(s,u),C=p.createElement("script"),Zt(C),hn(C,"link",s),p.head.appendChild(C)),C={type:"script",instance:C,count:1,state:null},y.set(E,C))}}function Uz(s,u){wi.M(s,u);var p=vo;if(p&&s){var y=Hi(p).hoistableScripts,E=xo(s),C=y.get(E);C||(C=p.querySelector(fu(E)),C||(s=d({src:s,async:!0,type:"module"},u),(u=mr.get(E))&&vy(s,u),C=p.createElement("script"),Zt(C),hn(C,"link",s),p.head.appendChild(C)),C={type:"script",instance:C,count:1,state:null},y.set(E,C))}}function eT(s,u,p,y){var E=(E=Y.current)?Jf(E):null;if(!E)throw Error(r(446));switch(s){case"meta":case"title":return null;case"style":return typeof p.precedence=="string"&&typeof p.href=="string"?(u=_o(p.href),p=Hi(E).hoistableStyles,y=p.get(u),y||(y={type:"style",instance:null,count:0,state:null},p.set(u,y)),y):{type:"void",instance:null,count:0,state:null};case"link":if(p.rel==="stylesheet"&&typeof p.href=="string"&&typeof p.precedence=="string"){s=_o(p.href);var C=Hi(E).hoistableStyles,F=C.get(s);if(F||(E=E.ownerDocument||E,F={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},C.set(s,F),(C=E.querySelector(cu(s)))&&!C._p&&(F.instance=C,F.state.loading=5),mr.has(s)||(p={rel:"preload",as:"style",href:p.href,crossOrigin:p.crossOrigin,integrity:p.integrity,media:p.media,hrefLang:p.hrefLang,referrerPolicy:p.referrerPolicy},mr.set(s,p),C||Vz(E,s,p,F.state))),u&&y===null)throw Error(r(528,""));return F}if(u&&y!==null)throw Error(r(529,""));return null;case"script":return u=p.async,p=p.src,typeof p=="string"&&u&&typeof u!="function"&&typeof u!="symbol"?(u=xo(p),p=Hi(E).hoistableScripts,y=p.get(u),y||(y={type:"script",instance:null,count:0,state:null},p.set(u,y)),y):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,s))}}function _o(s){return'href="'+Rn(s)+'"'}function cu(s){return'link[rel="stylesheet"]['+s+"]"}function tT(s){return d({},s,{"data-precedence":s.precedence,precedence:null})}function Vz(s,u,p,y){s.querySelector('link[rel="preload"][as="style"]['+u+"]")?y.loading=1:(u=s.createElement("link"),y.preload=u,u.addEventListener("load",function(){return y.loading|=1}),u.addEventListener("error",function(){return y.loading|=2}),hn(u,"link",p),Zt(u),s.head.appendChild(u))}function xo(s){return'[src="'+Rn(s)+'"]'}function fu(s){return"script[async]"+s}function nT(s,u,p){if(u.count++,u.instance===null)switch(u.type){case"style":var y=s.querySelector('style[data-href~="'+Rn(p.href)+'"]');if(y)return u.instance=y,Zt(y),y;var E=d({},p,{"data-href":p.href,"data-precedence":p.precedence,href:null,precedence:null});return y=(s.ownerDocument||s).createElement("style"),Zt(y),hn(y,"style",E),ed(y,p.precedence,s),u.instance=y;case"stylesheet":E=_o(p.href);var C=s.querySelector(cu(E));if(C)return u.state.loading|=4,u.instance=C,Zt(C),C;y=tT(p),(E=mr.get(E))&&by(y,E),C=(s.ownerDocument||s).createElement("link"),Zt(C);var F=C;return F._p=new Promise(function(Z,ee){F.onload=Z,F.onerror=ee}),hn(C,"link",y),u.state.loading|=4,ed(C,p.precedence,s),u.instance=C;case"script":return C=xo(p.src),(E=s.querySelector(fu(C)))?(u.instance=E,Zt(E),E):(y=p,(E=mr.get(C))&&(y=d({},p),vy(y,E)),s=s.ownerDocument||s,E=s.createElement("script"),Zt(E),hn(E,"link",y),s.head.appendChild(E),u.instance=E);case"void":return null;default:throw Error(r(443,u.type))}else u.type==="stylesheet"&&(u.state.loading&4)===0&&(y=u.instance,u.state.loading|=4,ed(y,p.precedence,s));return u.instance}function ed(s,u,p){for(var y=p.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),E=y.length?y[y.length-1]:null,C=E,F=0;F<y.length;F++){var Z=y[F];if(Z.dataset.precedence===u)C=Z;else if(C!==E)break}C?C.parentNode.insertBefore(s,C.nextSibling):(u=p.nodeType===9?p.head:p,u.insertBefore(s,u.firstChild))}function by(s,u){s.crossOrigin==null&&(s.crossOrigin=u.crossOrigin),s.referrerPolicy==null&&(s.referrerPolicy=u.referrerPolicy),s.title==null&&(s.title=u.title)}function vy(s,u){s.crossOrigin==null&&(s.crossOrigin=u.crossOrigin),s.referrerPolicy==null&&(s.referrerPolicy=u.referrerPolicy),s.integrity==null&&(s.integrity=u.integrity)}var td=null;function rT(s,u,p){if(td===null){var y=new Map,E=td=new Map;E.set(p,y)}else E=td,y=E.get(p),y||(y=new Map,E.set(p,y));if(y.has(s))return y;for(y.set(s,null),p=p.getElementsByTagName(s),E=0;E<p.length;E++){var C=p[E];if(!(C[qa]||C[sn]||s==="link"&&C.getAttribute("rel")==="stylesheet")&&C.namespaceURI!=="http://www.w3.org/2000/svg"){var F=C.getAttribute(u)||"";F=s+F;var Z=y.get(F);Z?Z.push(C):y.set(F,[C])}}return y}function iT(s,u,p){s=s.ownerDocument||s,s.head.insertBefore(p,u==="title"?s.querySelector("head > title"):null)}function Hz(s,u,p){if(p===1||u.itemProp!=null)return!1;switch(s){case"meta":case"title":return!0;case"style":if(typeof u.precedence!="string"||typeof u.href!="string"||u.href==="")break;return!0;case"link":if(typeof u.rel!="string"||typeof u.href!="string"||u.href===""||u.onLoad||u.onError)break;switch(u.rel){case"stylesheet":return s=u.disabled,typeof u.precedence=="string"&&s==null;default:return!0}case"script":if(u.async&&typeof u.async!="function"&&typeof u.async!="symbol"&&!u.onLoad&&!u.onError&&u.src&&typeof u.src=="string")return!0}return!1}function aT(s){return!(s.type==="stylesheet"&&(s.state.loading&3)===0)}var du=null;function Gz(){}function Yz(s,u,p){if(du===null)throw Error(r(475));var y=du;if(u.type==="stylesheet"&&(typeof p.media!="string"||matchMedia(p.media).matches!==!1)&&(u.state.loading&4)===0){if(u.instance===null){var E=_o(p.href),C=s.querySelector(cu(E));if(C){s=C._p,s!==null&&typeof s=="object"&&typeof s.then=="function"&&(y.count++,y=nd.bind(y),s.then(y,y)),u.state.loading|=4,u.instance=C,Zt(C);return}C=s.ownerDocument||s,p=tT(p),(E=mr.get(E))&&by(p,E),C=C.createElement("link"),Zt(C);var F=C;F._p=new Promise(function(Z,ee){F.onload=Z,F.onerror=ee}),hn(C,"link",p),u.instance=C}y.stylesheets===null&&(y.stylesheets=new Map),y.stylesheets.set(u,s),(s=u.state.preload)&&(u.state.loading&3)===0&&(y.count++,u=nd.bind(y),s.addEventListener("load",u),s.addEventListener("error",u))}}function Zz(){if(du===null)throw Error(r(475));var s=du;return s.stylesheets&&s.count===0&&_y(s,s.stylesheets),0<s.count?function(u){var p=setTimeout(function(){if(s.stylesheets&&_y(s,s.stylesheets),s.unsuspend){var y=s.unsuspend;s.unsuspend=null,y()}},6e4);return s.unsuspend=u,function(){s.unsuspend=null,clearTimeout(p)}}:null}function nd(){if(this.count--,this.count===0){if(this.stylesheets)_y(this,this.stylesheets);else if(this.unsuspend){var s=this.unsuspend;this.unsuspend=null,s()}}}var rd=null;function _y(s,u){s.stylesheets=null,s.unsuspend!==null&&(s.count++,rd=new Map,u.forEach(Kz,s),rd=null,nd.call(s))}function Kz(s,u){if(!(u.state.loading&4)){var p=rd.get(s);if(p)var y=p.get(null);else{p=new Map,rd.set(s,p);for(var E=s.querySelectorAll("link[data-precedence],style[data-precedence]"),C=0;C<E.length;C++){var F=E[C];(F.nodeName==="LINK"||F.getAttribute("media")!=="not all")&&(p.set(F.dataset.precedence,F),y=F)}y&&p.set(null,y)}E=u.instance,F=E.getAttribute("data-precedence"),C=p.get(F)||y,C===y&&p.set(null,E),p.set(F,E),this.count++,y=nd.bind(this),E.addEventListener("load",y),E.addEventListener("error",y),C?C.parentNode.insertBefore(E,C.nextSibling):(s=s.nodeType===9?s.head:s,s.insertBefore(E,s.firstChild)),u.state.loading|=4}}var hu={$$typeof:x,Provider:null,Consumer:null,_currentValue:K,_currentValue2:K,_threadCount:0};function Xz(s,u,p,y,E,C,F,Z){this.tag=1,this.containerInfo=s,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=gl(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=gl(0),this.hiddenUpdates=gl(null),this.identifierPrefix=y,this.onUncaughtError=E,this.onCaughtError=C,this.onRecoverableError=F,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=Z,this.incompleteTransitions=new Map}function sT(s,u,p,y,E,C,F,Z,ee,ce,ge,ve){return s=new Xz(s,u,p,F,Z,ee,ce,ve),u=1,C===!0&&(u|=24),C=Vn(3,null,null,u),s.current=C,C.stateNode=s,u=tg(),u.refCount++,s.pooledCache=u,u.refCount++,C.memoizedState={element:y,isDehydrated:p,cache:u},ag(C),s}function oT(s){return s?(s=Ws,s):Ws}function lT(s,u,p,y,E,C){E=oT(E),y.context===null?y.context=E:y.pendingContext=E,y=Qi(u),y.payload={element:p},C=C===void 0?null:C,C!==null&&(y.callback=C),p=Ji(s,y,u),p!==null&&(Kn(p,s,u),Ul(p,s,u))}function uT(s,u){if(s=s.memoizedState,s!==null&&s.dehydrated!==null){var p=s.retryLane;s.retryLane=p!==0&&p<u?p:u}}function xy(s,u){uT(s,u),(s=s.alternate)&&uT(s,u)}function cT(s){if(s.tag===13){var u=Xs(s,67108864);u!==null&&Kn(u,s,67108864),xy(s,67108864)}}var id=!0;function Wz(s,u,p,y){var E=B.T;B.T=null;var C=G.p;try{G.p=2,wy(s,u,p,y)}finally{G.p=C,B.T=E}}function Qz(s,u,p,y){var E=B.T;B.T=null;var C=G.p;try{G.p=8,wy(s,u,p,y)}finally{G.p=C,B.T=E}}function wy(s,u,p,y){if(id){var E=Sy(y);if(E===null)uy(s,u,y,ad,p),dT(s,y);else if(eq(E,s,u,p,y))y.stopPropagation();else if(dT(s,y),u&4&&-1<Jz.indexOf(s)){for(;E!==null;){var C=oi(E);if(C!==null)switch(C.tag){case 3:if(C=C.stateNode,C.current.memoizedState.isDehydrated){var F=wn(C.pendingLanes);if(F!==0){var Z=C;for(Z.pendingLanes|=2,Z.entangledLanes|=2;F;){var ee=1<<31-je(F);Z.entanglements[1]|=ee,F&=~ee}Vr(C),(bt&6)===0&&(Bf=we()+500,su(0))}}break;case 13:Z=Xs(C,2),Z!==null&&Kn(Z,C,2),Vf(),xy(C,2)}if(C=Sy(y),C===null&&uy(s,u,y,ad,p),C===E)break;E=C}E!==null&&y.stopPropagation()}else uy(s,u,y,null,p)}}function Sy(s){return s=Cm(s),Ey(s)}var ad=null;function Ey(s){if(ad=null,s=si(s),s!==null){var u=a(s);if(u===null)s=null;else{var p=u.tag;if(p===13){if(s=o(u),s!==null)return s;s=null}else if(p===3){if(u.stateNode.current.memoizedState.isDehydrated)return u.tag===3?u.stateNode.containerInfo:null;s=null}else u!==s&&(s=null)}}return ad=s,null}function fT(s){switch(s){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Ve()){case qe:return 2;case We:return 8;case He:case $e:return 32;case Be:return 268435456;default:return 32}default:return 32}}var ky=!1,da=null,ha=null,pa=null,pu=new Map,mu=new Map,ma=[],Jz="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function dT(s,u){switch(s){case"focusin":case"focusout":da=null;break;case"dragenter":case"dragleave":ha=null;break;case"mouseover":case"mouseout":pa=null;break;case"pointerover":case"pointerout":pu.delete(u.pointerId);break;case"gotpointercapture":case"lostpointercapture":mu.delete(u.pointerId)}}function gu(s,u,p,y,E,C){return s===null||s.nativeEvent!==C?(s={blockedOn:u,domEventName:p,eventSystemFlags:y,nativeEvent:C,targetContainers:[E]},u!==null&&(u=oi(u),u!==null&&cT(u)),s):(s.eventSystemFlags|=y,u=s.targetContainers,E!==null&&u.indexOf(E)===-1&&u.push(E),s)}function eq(s,u,p,y,E){switch(u){case"focusin":return da=gu(da,s,u,p,y,E),!0;case"dragenter":return ha=gu(ha,s,u,p,y,E),!0;case"mouseover":return pa=gu(pa,s,u,p,y,E),!0;case"pointerover":var C=E.pointerId;return pu.set(C,gu(pu.get(C)||null,s,u,p,y,E)),!0;case"gotpointercapture":return C=E.pointerId,mu.set(C,gu(mu.get(C)||null,s,u,p,y,E)),!0}return!1}function hT(s){var u=si(s.target);if(u!==null){var p=a(u);if(p!==null){if(u=p.tag,u===13){if(u=o(p),u!==null){s.blockedOn=u,vm(s.priority,function(){if(p.tag===13){var y=Zn();y=bl(y);var E=Xs(p,y);E!==null&&Kn(E,p,y),xy(p,y)}});return}}else if(u===3&&p.stateNode.current.memoizedState.isDehydrated){s.blockedOn=p.tag===3?p.stateNode.containerInfo:null;return}}}s.blockedOn=null}function sd(s){if(s.blockedOn!==null)return!1;for(var u=s.targetContainers;0<u.length;){var p=Sy(s.nativeEvent);if(p===null){p=s.nativeEvent;var y=new p.constructor(p.type,p);Tm=y,p.target.dispatchEvent(y),Tm=null}else return u=oi(p),u!==null&&cT(u),s.blockedOn=p,!1;u.shift()}return!0}function pT(s,u,p){sd(s)&&p.delete(u)}function tq(){ky=!1,da!==null&&sd(da)&&(da=null),ha!==null&&sd(ha)&&(ha=null),pa!==null&&sd(pa)&&(pa=null),pu.forEach(pT),mu.forEach(pT)}function od(s,u){s.blockedOn===u&&(s.blockedOn=null,ky||(ky=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,tq)))}var ld=null;function mT(s){ld!==s&&(ld=s,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){ld===s&&(ld=null);for(var u=0;u<s.length;u+=3){var p=s[u],y=s[u+1],E=s[u+2];if(typeof y!="function"){if(Ey(y||p)===null)continue;break}var C=oi(p);C!==null&&(s.splice(u,3),u-=3,Eg(C,{pending:!0,data:E,method:p.method,action:y},y,E))}}))}function yu(s){function u(ee){return od(ee,s)}da!==null&&od(da,s),ha!==null&&od(ha,s),pa!==null&&od(pa,s),pu.forEach(u),mu.forEach(u);for(var p=0;p<ma.length;p++){var y=ma[p];y.blockedOn===s&&(y.blockedOn=null)}for(;0<ma.length&&(p=ma[0],p.blockedOn===null);)hT(p),p.blockedOn===null&&ma.shift();if(p=(s.ownerDocument||s).$$reactFormReplay,p!=null)for(y=0;y<p.length;y+=3){var E=p[y],C=p[y+1],F=E[yn]||null;if(typeof C=="function")F||mT(p);else if(F){var Z=null;if(C&&C.hasAttribute("formAction")){if(E=C,F=C[yn]||null)Z=F.formAction;else if(Ey(E)!==null)continue}else Z=F.action;typeof Z=="function"?p[y+1]=Z:(p.splice(y,3),y-=3),mT(p)}}}function Ay(s){this._internalRoot=s}ud.prototype.render=Ay.prototype.render=function(s){var u=this._internalRoot;if(u===null)throw Error(r(409));var p=u.current,y=Zn();lT(p,y,s,u,null,null)},ud.prototype.unmount=Ay.prototype.unmount=function(){var s=this._internalRoot;if(s!==null){this._internalRoot=null;var u=s.containerInfo;lT(s.current,2,null,s,null,null),Vf(),u[Ui]=null}};function ud(s){this._internalRoot=s}ud.prototype.unstable_scheduleHydration=function(s){if(s){var u=Zc();s={blockedOn:null,target:s,priority:u};for(var p=0;p<ma.length&&u!==0&&u<ma[p].priority;p++);ma.splice(p,0,s),p===0&&hT(s)}};var gT=t.version;if(gT!=="19.1.0")throw Error(r(527,gT,"19.1.0"));G.findDOMNode=function(s){var u=s._reactInternals;if(u===void 0)throw typeof s.render=="function"?Error(r(188)):(s=Object.keys(s).join(","),Error(r(268,s)));return s=c(u),s=s!==null?f(s):null,s=s===null?null:s.stateNode,s};var nq={bundleType:0,version:"19.1.0",rendererPackageName:"react-dom",currentDispatcherRef:B,reconcilerVersion:"19.1.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var cd=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!cd.isDisabled&&cd.supportsFiber)try{pe=cd.inject(nq),_e=cd}catch{}}return vu.createRoot=function(s,u){if(!i(s))throw Error(r(299));var p=!1,y="",E=jA,C=MA,F=$A,Z=null;return u!=null&&(u.unstable_strictMode===!0&&(p=!0),u.identifierPrefix!==void 0&&(y=u.identifierPrefix),u.onUncaughtError!==void 0&&(E=u.onUncaughtError),u.onCaughtError!==void 0&&(C=u.onCaughtError),u.onRecoverableError!==void 0&&(F=u.onRecoverableError),u.unstable_transitionCallbacks!==void 0&&(Z=u.unstable_transitionCallbacks)),u=sT(s,1,!1,null,null,p,y,E,C,F,Z,null),s[Ui]=u.current,ly(s),new Ay(u)},vu.hydrateRoot=function(s,u,p){if(!i(s))throw Error(r(299));var y=!1,E="",C=jA,F=MA,Z=$A,ee=null,ce=null;return p!=null&&(p.unstable_strictMode===!0&&(y=!0),p.identifierPrefix!==void 0&&(E=p.identifierPrefix),p.onUncaughtError!==void 0&&(C=p.onUncaughtError),p.onCaughtError!==void 0&&(F=p.onCaughtError),p.onRecoverableError!==void 0&&(Z=p.onRecoverableError),p.unstable_transitionCallbacks!==void 0&&(ee=p.unstable_transitionCallbacks),p.formState!==void 0&&(ce=p.formState)),u=sT(s,1,!0,u,p??null,y,E,C,F,Z,ee,ce),u.context=oT(null),p=u.current,y=Zn(),y=bl(y),E=Qi(y),E.callback=null,Ji(p,E,y),p=y,u.current.lanes=p,za(u,p),Vr(u),s[Ui]=u.current,ly(s),new ud(u)},vu.version="19.1.0",vu}var CT;function pq(){if(CT)return Cy.exports;CT=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),Cy.exports=hq(),Cy.exports}var mq=pq();const gq=zn(mq);(()=>{var S,x,A,k,T,O,$,L;var e=`.container{background-color:var(--base00);color:var(--base05);padding:10px;letter-spacing:0.5px;font-family:monospace;border-radius:3px}.toolbar{display:flex;justify-content:space-between;align-items:center;margin-bottom:10px;padding-bottom:5px;border-bottom:solid 1px var(--base02)}.toolbar .options,.toolbar .search-wrapper{display:flex;align-items:center}.toolbar .icon-wrapper{height:15px;display:flex;align-items:center;padding:2px 5px}.toolbar .icon-wrapper:hover{background-color:var(--base02);border-radius:3px}.toolbar .icon-wrapper:first-child{margin-left:0px}.toolbar .search.icon{margin-right:5px}.toolbar .search-input{border:none;background:transparent;outline:none;flex:1;font-size:16px;color:var(--base0D)}.match{background-color:yellow;font-weight:bold;color:red}.data-row{padding:3px 0}.data-row .data-row{border-left:solid 1px var(--base02);padding-left:20px;margin-left:5px;display:none}.data-row.expanded>.data-row{display:block}.data-row .key-value-wrapper{display:flex;align-items:center}.data-row .key{color:var(--base07)}.data-row .key.number{color:var(--base0C)}.data-row .colon{color:var(--base07);margin:0 5px 0 0}.clickable{cursor:pointer}.data-row .opening-parenthesis,.data-row .closing-parenthesis{color:var(--base07)}.data-row .ellipsis{color:var(--base09)}.data-row.expanded>.key-value-wrapper .closing-parenthesis,.data-row.expanded>.key-value-wrapper .ellipsis{display:none}.data-row>.closing-parenthesis{display:none}.data-row.expanded>.closing-parenthesis{display:inline-block}.data-row .items-size{margin-left:10px;color:var(--base04);font-style:italic;display:none}.show-size .data-row .items-size{display:inline-block}.data-row .value.bool,.data-row .value.boolean{color:var(--base0E)}.data-row .value.function{color:var(--base0D)}.data-row .value.int,.data-row .value.integer{color:var(--base0F)}.data-row .value.float{color:var(--base0B)}.data-row .value.string{color:var(--base09)}.data-row .value.string .content{overflow-wrap:break-word}.data-row .value.string .content::before{content:open-quote}.data-row .value.string .content::after{content:close-quote}.data-row .value.regexp{color:var(--base0A)}.data-row .value.nan{color:var(--base08)}.data-row .value.null{color:var(--base0A)}.data-row .value.undefined{color:var(--base05)}.data-row .value.date{color:var(--base0D)}.data-row .value.nan,.data-row .value.null,.data-row .value.undefined{border-radius:3px;background-color:var(--base02);padding:1px 2px}.data-row .value .type{font-size:smaller;margin-right:4px;opacity:0.8;display:none}.data-row .value .value-data{word-break:break-all}.show-data-types .data-row .value .type{display:inline-block}.icon-wrapper,.copy-icon-wrapper{display:inline-block;cursor:pointer}.icon{display:block;position:relative}.icon:before,.icon:after{content:"";position:absolute;display:block}.expand.icon{margin-right:5px}.expand-icon-arrow .expand.icon{margin-left:3px;width:0;height:0;border-left:solid 6px var(--base0E);border-top:solid 6px transparent;border-bottom:solid 6px transparent}.expand-icon-arrow .expanded>.key-value-wrapper .expand.icon,.expand-icon-arrow .expanded.icon.expand{transform:rotate(90deg);border-left-color:var(--base0D)}.expand-icon-square .expand.icon,.expand-icon-circle .expand.icon{display:block;width:9px;height:9px;border-radius:2px;border:solid 1px var(--base0E)}.expand-icon-circle .expand.icon{border-radius:50%}.expand-icon-square .expand.icon:before,.expand-icon-circle .expand.icon:before,.expand-icon-square .expand.icon:after,.expand-icon-circle .expand.icon:after{width:5px;height:1px;background-color:var(--base0E);left:2px;top:4px}.expand-icon-square .expand.icon:after,.expand-icon-circle .expand.icon:after{transform:rotate(90deg)}.expand-icon-square .expanded>.key-value-wrapper .expand.icon:after,.expand-icon-circle .expanded>.key-value-wrapper .expand.icon:after,.expand-icon-square .expand.icon.expanded:after,.expand-icon-circle .expand.icon.expanded:after{display:none}.expand-icon-square .expanded>.key-value-wrapper .expand.icon,.expand-icon-circle .expanded>.key-value-wrapper .expand.icon,.expand-icon-square .expand.icon.expanded,.expand-icon-circle .expanded.expand.icon{border-color:var(--base0D)}.expand-icon-square .expanded>.key-value-wrapper .expand.icon:before,.expand-icon-circle .expanded>.key-value-wrapper .expand.icon:before,.expand-icon-square .expanded.expand.icon:before,.expand-icon-circle .expanded.expand.icon:before{background-color:var(--base0D)}.icon-wrapper{display:inline-block;cursor:pointer}.show-copy .key-value-wrapper:hover .icon.copy{display:block}.copy.icon{margin-left:10px;display:none;width:8px;height:10px;border:solid 1px var(--base0D);border-radius:1px;position:relative;top:4px;transition:0.2s all}.copy.icon:active{transform:scale(1.6);background-color:var(--base0B)}.copy.icon:before{content:"";display:block;left:-3px;top:-3px;width:8px;height:10px;border-top:solid 1px var(--base0D);border-left:solid 1px var(--base0D);border-radius:1px 0 0 0}.plus.icon{width:11px;height:1px;background-color:var(--base0D)}.plus.icon:after{content:"";width:11px;height:1px;background-color:var(--base0D);-webkit-transform:rotate(90deg);transform:rotate(90deg)}.minus.icon{width:11px;height:1px;background-color:var(--base0D)}.indent.icon{color:var(--base0D);width:17px;height:8px;border-top:solid 1px var(--base0D);border-bottom:solid 1px var(--base0D)}.indent.icon:before{content:"";position:absolute;top:2px;right:0;width:11px;height:2px;border-top:solid 1px var(--base0D);border-bottom:solid 1px var(--base0D)}.indent.icon:after{content:"";position:absolute;top:1px;width:0;height:0;border-top:solid 3px transparent;border-bottom:solid 3px transparent;border-left:solid 3px var(--base0D);border-right:solid 3px transparent}.outdent.icon{color:var(--base0D);margin-left:2px;width:17px;height:8px;border-top:solid 1px var(--base0D);border-bottom:solid 1px var(--base0D)}.outdent.icon:before{content:"";top:2px;right:0;width:11px;height:2px;border-top:solid 1px var(--base0D);border-bottom:solid 1px var(--base0D)}.outdent.icon:after{content:"";top:1px;left:-3px;width:0;height:0;border-top:solid 3px transparent;border-bottom:solid 3px transparent;border-left:solid 3px transparent;border-right:solid 3px var(--base0D)}.refresh.icon{color:var(--base0D);width:10px;height:10px;border-radius:50%;border-top:solid 1px var(--base0D);border-bottom:solid 1px var(--base0D);border-left:solid 1px transparent;border-right:solid 1px var(--base0D)}.refresh.icon:before{content:"";left:1px;top:8px;width:3px;height:3px;border-top:solid 1px var(--base0D);border-left:solid 1px var(--base0D);-webkit-transform:rotate(-22.5deg);transform:rotate(-22.5deg)}.info.icon{width:12px;height:11px;border:solid 1px var(--base0D);border-radius:2px}.info.icon::before{top:5px;left:5px;width:2px;height:5px;background-color:var(--base0D)}.info.icon::after{top:2px;left:5px;width:2px;height:2px;background-color:var(--base0D)}.info.icon.active{background-color:var(--base0D)}.info.icon.active::before,.info.icon.active::after{background-color:var(--base02)}.search.icon{color:var(--base0D);width:11px;height:11px;border:solid 1px var(--base0D);border-radius:100%;-webkit-transform:rotate(-45deg);transform:rotate(-45deg)}.search.icon:before{content:"";top:11px;left:5px;height:6px;width:1px;background-color:var(--base0D)}
|
|
50
|
+
`,t={apathy:["#031a16","#0b342d","#184e45","#2b685e","#5f9c92","#81b5ac","#a7cec8","#d2e7e4","#3e9688","#3e7996","#3e4c96","#883e96","#963e4c","#96883e","#4c963e","#3e965b"],ashes:["#1c2023","#393f45","#565e65","#747c84","#adb3ba","#c7ccd1","#dfe2e5","#f3f4f5","#c7ae95","#c7c795","#aec795","#95c7ae","#95aec7","#ae95c7","#c795ae","#c79595"],"atelier-dune-light":["#fefbec","#e8e4cf","#a6a28c","#999580","#7d7a68","#6e6b5e","#292824","#20201d","#d73737","#b65611","#ae9513","#60ac39","#1fad83","#6684e1","#b854d4","#d43552"],"atelier-dune":["#20201d","#292824","#6e6b5e","#7d7a68","#999580","#a6a28c","#e8e4cf","#fefbec","#d73737","#b65611","#ae9513","#60ac39","#1fad83","#6684e1","#b854d4","#d43552"],atlas:["#002635","#00384d","#517f8d","#6c8b91","#869696","#a1a19a","#e6e6dc","#fafaf8","#ff5a67","#f08e48","#ffcc1b","#7fc06e","#14747e","#5dd7b9","#9a70a4","#c43060"],bespin:["#28211c","#36312e","#5e5d5c","#666666","#797977","#8a8986","#9d9b97","#baae9e","#cf6a4c","#cf7d34","#f9ee98","#54be0d","#afc4db","#5ea6ea","#9b859d","#937121"],"black-metal":["#000000","#121212","#222222","#333333","#999999","#c1c1c1","#999999","#c1c1c1","#5f8787","#aaaaaa","#a06666","#dd9999","#aaaaaa","#888888","#999999","#444444"],brewer:["#0c0d0e","#2e2f30","#515253","#737475","#959697","#b7b8b9","#dadbdc","#fcfdfe","#e31a1c","#e6550d","#dca060","#31a354","#80b1d3","#3182bd","#756bb1","#b15928"],bright:["#000000","#303030","#505050","#b0b0b0","#d0d0d0","#e0e0e0","#f5f5f5","#ffffff","#fb0120","#fc6d24","#fda331","#a1c659","#76c7b7","#6fb3d2","#d381c3","#be643c"],brogrammer:["#1f1f1f","#f81118","#2dc55e","#ecba0f","#2a84d2","#4e5ab7","#1081d6","#d6dbe5","#d6dbe5","#de352e","#1dd361","#f3bd09","#1081d6","#5350b9","#0f7ddb","#ffffff"],"brushtrees-dark":["#485867","#5a6d7a","#6d828e","#8299a1","#98afb5","#b0c5c8","#c9dbdc","#e3efef","#b38686","#d8bba2","#aab386","#87b386","#86b3b3","#868cb3","#b386b2","#b39f9f"],brushtrees:["#e3efef","#c9dbdc","#b0c5c8","#98afb5","#8299a1","#6d828e","#5a6d7a","#485867","#b38686","#d8bba2","#aab386","#87b386","#86b3b3","#868cb3","#b386b2","#b39f9f"],chalk:["#151515","#202020","#303030","#505050","#b0b0b0","#d0d0d0","#e0e0e0","#f5f5f5","#fb9fb1","#eda987","#ddb26f","#acc267","#12cfc0","#6fc2ef","#e1a3ee","#deaf8f"],circus:["#191919","#202020","#303030","#5f5a60","#505050","#a7a7a7","#808080","#ffffff","#dc657d","#4bb1a7","#c3ba63","#84b97c","#4bb1a7","#639ee4","#b888e2","#b888e2"],"classic-dark":["#151515","#202020","#303030","#505050","#b0b0b0","#d0d0d0","#e0e0e0","#f5f5f5","#ac4142","#d28445","#f4bf75","#90a959","#75b5aa","#6a9fb5","#aa759f","#8f5536"],"classic-light":["#f5f5f5","#e0e0e0","#d0d0d0","#b0b0b0","#505050","#303030","#202020","#151515","#ac4142","#d28445","#f4bf75","#90a959","#75b5aa","#6a9fb5","#aa759f","#8f5536"],codeschool:["#232c31","#1c3657","#2a343a","#3f4944","#84898c","#9ea7a6","#a7cfa3","#b5d8f6","#2a5491","#43820d","#a03b1e","#237986","#b02f30","#484d79","#c59820","#c98344"],cupcake:["#fbf1f2","#f2f1f4","#d8d5dd","#bfb9c6","#a59daf","#8b8198","#72677e","#585062","#d57e85","#ebb790","#dcb16c","#a3b367","#69a9a7","#7297b9","#bb99b4","#baa58c"],cupertino:["#ffffff","#c0c0c0","#c0c0c0","#808080","#808080","#404040","#404040","#5e5e5e","#c41a15","#eb8500","#826b28","#007400","#318495","#0000ff","#a90d91","#826b28"],darcula:["#2b2b2b","#323232","#323232","#606366","#a4a3a3","#a9b7c6","#ffc66d","#ffffff","#4eade5","#689757","#bbb529","#6a8759","#629755","#9876aa","#cc7832","#808080"],darktooth:["#1d2021","#32302f","#504945","#665c54","#928374","#a89984","#d5c4a1","#fdf4c1","#fb543f","#fe8625","#fac03b","#95c085","#8ba59b","#0d6678","#8f4673","#a87322"],"default-dark":["#181818","#282828","#383838","#585858","#b8b8b8","#d8d8d8","#e8e8e8","#f8f8f8","#ab4642","#dc9656","#f7ca88","#a1b56c","#86c1b9","#7cafc2","#ba8baf","#a16946"],"default-light":["#ffffff","#e8e8e8","#d8d8d8","#b8b8b8","#585858","#383838","#282828","#181818","#ab4642","#dc9656","#ab4642","#a1b56c","#86c1b9","#7cafc2","#ba8baf","#a16946"],dracula:["#282936","#3a3c4e","#4d4f68","#626483","#62d6e8","#e9e9f4","#f1f2f8","#f7f7fb","#ea51b2","#b45bcf","#00f769","#ebff87","#a1efe4","#62d6e8","#b45bcf","#00f769"],eighties:["#2d2d2d","#393939","#515151","#747369","#a09f93","#d3d0c8","#e8e6df","#f2f0ec","#f2777a","#f99157","#ffcc66","#99cc99","#66cccc","#6699cc","#cc99cc","#d27b53"],embers:["#16130f","#2c2620","#433b32","#5a5047","#8a8075","#a39a90","#beb6ae","#dbd6d1","#826d57","#828257","#6d8257","#57826d","#576d82","#6d5782","#82576d","#825757"],flat:["#2c3e50","#34495e","#7f8c8d","#95a5a6","#bdc3c7","#e0e0e0","#f5f5f5","#ecf0f1","#e74c3c","#e67e22","#f1c40f","#2ecc71","#1abc9c","#3498db","#9b59b6","#be643c"],"fruit-soda":["#f1ecf1","#e0dee0","#d8d5d5","#b5b4b6","#979598","#515151","#474545","#2d2c2c","#fe3e31","#fe6d08","#f7e203","#47f74c","#0f9cfd","#2931df","#611fce","#b16f40"],github:["#ffffff","#f5f5f5","#c8c8fa","#969896","#e8e8e8","#333333","#ffffff","#969896","#ed6a43","#0086b3","#795da3","#183691","#183691","#795da3","#a71d5d","#333333"],"google-dark":["#1d1f21","#282a2e","#373b41","#969896","#b4b7b4","#c5c8c6","#e0e0e0","#ffffff","#cc342b","#f96a38","#fba922","#198844","#3971ed","#3971ed","#a36ac7","#3971ed"],"google-light":["#ffffff","#e0e0e0","#c5c8c6","#b4b7b4","#969896","#373b41","#282a2e","#1d1f21","#cc342b","#f96a38","#fba922","#198844","#3971ed","#3971ed","#a36ac7","#3971ed"],"grayscale-dark":["#101010","#252525","#464646","#525252","#ababab","#b9b9b9","#e3e3e3","#f7f7f7","#7c7c7c","#999999","#a0a0a0","#8e8e8e","#868686","#686868","#747474","#5e5e5e"],"grayscale-light":["#f7f7f7","#e3e3e3","#b9b9b9","#ababab","#525252","#464646","#252525","#101010","#7c7c7c","#999999","#a0a0a0","#8e8e8e","#868686","#686868","#747474","#5e5e5e"],greenscreen:["#001100","#003300","#005500","#007700","#009900","#00bb00","#00dd00","#00ff00","#007700","#009900","#007700","#00bb00","#005500","#009900","#00bb00","#005500"],"gruvbox-dark-hard":["#1d2021","#3c3836","#504945","#665c54","#bdae93","#d5c4a1","#ebdbb2","#fbf1c7","#fb4934","#fe8019","#fabd2f","#b8bb26","#8ec07c","#83a598","#d3869b","#d65d0e"],"gruvbox-light-hard":["#f9f5d7","#ebdbb2","#d5c4a1","#bdae93","#665c54","#504945","#3c3836","#282828","#9d0006","#af3a03","#b57614","#79740e","#427b58","#076678","#8f3f71","#d65d0e"],"harmonic-dark":["#0b1c2c","#223b54","#405c79","#627e99","#aabcce","#cbd6e2","#e5ebf1","#f7f9fb","#bf8b56","#bfbf56","#8bbf56","#56bf8b","#568bbf","#8b56bf","#bf568b","#bf5656"],"harmonic-light":["#f7f9fb","#e5ebf1","#cbd6e2","#aabcce","#627e99","#405c79","#223b54","#0b1c2c","#bf8b56","#bfbf56","#8bbf56","#56bf8b","#568bbf","#8b56bf","#bf568b","#bf5656"],"heetch-light":["#feffff","#392551","#7b6d8b","#9c92a8","#ddd6e5","#5a496e","#470546","#190134","#27d9d5","#bdb6c5","#5ba2b6","#f80059","#c33678","#47f9f5","#bd0152","#dedae2"],heetch:["#190134","#392551","#5a496e","#7b6d8b","#9c92a8","#bdb6c5","#dedae2","#feffff","#27d9d5","#5ba2b6","#8f6c97","#c33678","#f80059","#bd0152","#82034c","#470546"],helios:["#1d2021","#383c3e","#53585b","#6f7579","#cdcdcd","#d5d5d5","#dddddd","#e5e5e5","#d72638","#eb8413","#f19d1a","#88b92d","#1ba595","#1e8bac","#be4264","#c85e0d"],hopscotch:["#322931","#433b42","#5c545b","#797379","#989498","#b9b5b8","#d5d3d5","#ffffff","#dd464c","#fd8b19","#fdcc59","#8fc13e","#149b93","#1290bf","#c85e7c","#b33508"],"horizon-dark":["#1c1e26","#232530","#2e303e","#676a8d","#ced1d0","#cbced0","#dcdfe4","#e3e6ee","#e93c58","#e58d7d","#efb993","#efaf8e","#24a8b4","#df5273","#b072d1","#e4a382"],"ia-dark":["#1a1a1a","#222222","#1d414d","#767676","#b8b8b8","#cccccc","#e8e8e8","#f8f8f8","#d88568","#d86868","#b99353","#83a471","#7c9cae","#8eccdd","#b98eb2","#8b6c37"],"ia-light":["#f6f6f6","#dedede","#bde5f2","#898989","#767676","#181818","#e8e8e8","#898989","#9c5a02","#c43e18","#c48218","#38781c","#2d6bb1","#48bac2","#a94598","#8b6c37"],icy:["#021012","#031619","#041f23","#052e34","#064048","#095b67","#0c7c8c","#109cb0","#16c1d9","#b3ebf2","#80deea","#4dd0e1","#26c6da","#00bcd4","#00acc1","#0097a7"],isotope:["#000000","#404040","#606060","#808080","#c0c0c0","#d0d0d0","#e0e0e0","#ffffff","#ff0000","#ff9900","#ff0099","#33ff00","#00ffff","#0066ff","#cc00ff","#3300ff"],macintosh:["#000000","#404040","#404040","#808080","#808080","#c0c0c0","#c0c0c0","#ffffff","#dd0907","#ff6403","#fbf305","#1fb714","#02abea","#0000d3","#4700a5","#90713a"],marrakesh:["#201602","#302e00","#5f5b17","#6c6823","#86813b","#948e48","#ccc37a","#faf0a5","#c35359","#b36144","#a88339","#18974e","#75a738","#477ca1","#8868b3","#b3588e"],materia:["#263238","#2c393f","#37474f","#707880","#c9ccd3","#cdd3de","#d5dbe5","#ffffff","#ec5f67","#ea9560","#ffcc00","#8bd649","#80cbc4","#89ddff","#82aaff","#ec5f67"],"material-lighter":["#fafafa","#e7eaec","#cceae7","#ccd7da","#8796b0","#80cbc4","#80cbc4","#666666","#ff5370","#f76d47","#ffb62c","#91b859","#39adb5","#6182b8","#7c4dff","#e53935"],material:["#263238","#2e3c43","#314549","#546e7a","#b2ccd6","#eeffff","#eeffff","#ffffff","#f07178","#f78c6c","#ffcb6b","#c3e88d","#89ddff","#82aaff","#c792ea","#ff5370"],"mellow-purple":["#1e0528","#1a092d","#331354","#320f55","#873582","#ffeeff","#ffeeff","#f8c0ff","#00d9e9","#aa00a3","#955ae7","#05cb0d","#b900b1","#550068","#8991bb","#4d6fff"],"mexico-light":["#f8f8f8","#e8e8e8","#d8d8d8","#b8b8b8","#585858","#383838","#282828","#181818","#ab4642","#dc9656","#f79a0e","#538947","#4b8093","#7cafc2","#96609e","#a16946"],mocha:["#3b3228","#534636","#645240","#7e705a","#b8afad","#d0c8c6","#e9e1dd","#f5eeeb","#cb6077","#d28b71","#f4bc87","#beb55b","#7bbda4","#8ab3b5","#a89bb9","#bb9584"],monokai:["#272822","#383830","#49483e","#75715e","#a59f85","#f8f8f2","#f5f4f1","#f9f8f5","#f92672","#fd971f","#f4bf75","#a6e22e","#a1efe4","#66d9ef","#ae81ff","#cc6633"],nord:["#2e3440","#3b4252","#434c5e","#4c566a","#d8dee9","#e5e9f0","#eceff4","#8fbcbb","#88c0d0","#81a1c1","#5e81ac","#bf616a","#d08770","#ebcb8b","#a3be8c","#b48ead"],ocean:["#2b303b","#343d46","#4f5b66","#65737e","#a7adba","#c0c5ce","#dfe1e8","#eff1f5","#bf616a","#d08770","#ebcb8b","#a3be8c","#96b5b4","#8fa1b3","#b48ead","#ab7967"],"one-light":["#fafafa","#f0f0f1","#e5e5e6","#a0a1a7","#696c77","#383a42","#202227","#090a0b","#ca1243","#d75f00","#c18401","#50a14f","#0184bc","#4078f2","#a626a4","#986801"],onedark:["#282c34","#353b45","#3e4451","#545862","#565c64","#abb2bf","#b6bdca","#c8ccd4","#e06c75","#d19a66","#e5c07b","#98c379","#56b6c2","#61afef","#c678dd","#be5046"],"papercolor-dark":["#1c1c1c","#af005f","#5faf00","#d7af5f","#5fafd7","#808080","#d7875f","#d0d0d0","#585858","#5faf5f","#afd700","#af87d7","#ffaf00","#ff5faf","#00afaf","#5f8787"],"papercolor-light":["#eeeeee","#af0000","#008700","#5f8700","#0087af","#878787","#005f87","#444444","#bcbcbc","#d70000","#d70087","#8700af","#d75f00","#d75f00","#005faf","#005f87"],paraiso:["#2f1e2e","#41323f","#4f424c","#776e71","#8d8687","#a39e9b","#b9b6b0","#e7e9db","#ef6155","#f99b15","#fec418","#48b685","#5bc4bf","#06b6ef","#815ba4","#e96ba8"],pico:["#000000","#1d2b53","#7e2553","#008751","#ab5236","#5f574f","#c2c3c7","#fff1e8","#ff004d","#ffa300","#fff024","#00e756","#29adff","#83769c","#ff77a8","#ffccaa"],pop:["#000000","#202020","#303030","#505050","#b0b0b0","#d0d0d0","#e0e0e0","#ffffff","#eb008a","#f29333","#f8ca12","#37b349","#00aabb","#0e5a94","#b31e8d","#7a2d00"],railscasts:["#2b2b2b","#272935","#3a4055","#5a647e","#d4cfc9","#e6e1dc","#f4f1ed","#f9f7f3","#da4939","#cc7833","#ffc66d","#a5c261","#519f50","#6d9cbe","#b6b3eb","#bc9458"],seti:["#151718","#282a2b","#3b758c","#41535b","#43a5d5","#d6d6d6","#eeeeee","#ffffff","#cd3f45","#db7b55","#e6cd69","#9fca56","#55dbbe","#55b5db","#a074c4","#8a553f"],"solarized-dark":["#002b36","#073642","#586e75","#657b83","#839496","#93a1a1","#eee8d5","#fdf6e3","#dc322f","#cb4b16","#b58900","#859900","#2aa198","#268bd2","#6c71c4","#d33682"],"solarized-light":["#fdf6e3","#eee8d5","#93a1a1","#839496","#657b83","#586e75","#073642","#002b36","#dc322f","#cb4b16","#b58900","#859900","#2aa198","#268bd2","#6c71c4","#d33682"],spacemacs:["#1f2022","#282828","#444155","#585858","#b8b8b8","#a3a3a3","#e8e8e8","#f8f8f8","#f2241f","#ffa500","#b1951d","#67b11d","#2d9574","#4f97d7","#a31db1","#b03060"],"summerfruit-dark":["#151515","#202020","#303030","#505050","#b0b0b0","#d0d0d0","#e0e0e0","#ffffff","#ff0086","#fd8900","#aba800","#00c918","#1faaaa","#3777e6","#ad00a1","#cc6633"],"summerfruit-light":["#ffffff","#e0e0e0","#d0d0d0","#b0b0b0","#000000","#101010","#151515","#202020","#ff0086","#fd8900","#aba800","#00c918","#1faaaa","#3777e6","#ad00a1","#cc6633"],"tomorrow-night":["#1d1f21","#282a2e","#373b41","#969896","#b4b7b4","#c5c8c6","#e0e0e0","#ffffff","#cc6666","#de935f","#f0c674","#b5bd68","#8abeb7","#81a2be","#b294bb","#a3685a"],tomorrow:["#ffffff","#e0e0e0","#d6d6d6","#8e908c","#969896","#4d4d4c","#282a2e","#1d1f21","#c82829","#f5871f","#eab700","#718c00","#3e999f","#4271ae","#8959a8","#a3685a"],tube:["#231f20","#1c3f95","#5a5758","#737171","#959ca1","#d9d8d8","#e7e7e8","#ffffff","#ee2e24","#f386a1","#ffd204","#00853e","#85cebc","#009ddc","#98005d","#b06110"],twilight:["#1e1e1e","#323537","#464b50","#5f5a60","#838184","#a7a7a7","#c3c3c3","#ffffff","#cf6a4c","#cda869","#f9ee98","#8f9d6a","#afc4db","#7587a6","#9b859d","#9b703f"],woodland:["#231e18","#302b25","#48413a","#9d8b70","#b4a490","#cabcb1","#d7c8bc","#e4d4c8","#d35c5c","#ca7f32","#e0ac16","#b7ba53","#6eb958","#88a4d3","#bb90e2","#b49368"],zenburn:["#383838","#404040","#606060","#6f6f6f","#808080","#dcdccc","#c0c0c0","#ffffff","#dca3a3","#dfaf8f","#e0cf9f","#5f7f5f","#93e0e3","#7cb8bb","#dc8cc3","#000000"]},n=M=>{let z;if(typeof M=="string"){if(t[M]===void 0)throw new Error(`${M} not found`);z=t[M].reduce((P,q,D)=>{let H=`base0${D.toString(16).toUpperCase()}`;return P[H]=q,P},{})}else z=M;return`.container{${Object.keys(z).map(P=>`--${P}: ${z[P]};`).join("")}}`},r=M=>{try{return!!new URL(M)}catch{return!1}},i=M=>{if(Array.isArray(M))return"array";if(M===null)return"null";if(M instanceof RegExp)return"regexp";let z=typeof M;return z==="number"?isNaN(M)?"NaN":isFinite(M)?Number.isInteger(M)?"int":"float":"Infinity":z==="boolean"?"bool":z==="object"&&M instanceof Date?"date":z},a=M=>{if(typeof M=="boolean")return M;if(M==="true")return!0;if(M==="false")return!1;throw new Error("should be a boolean!")},o=M=>{if(typeof M=="string")return M;throw new Error("should be a string!")},l=M=>{if(typeof M=="number"&&M>=0)return M;if(typeof M=="string"&&(M=parseFloat(M)),isNaN(M)||M<0)throw new Error("should be a positive number!");return M},c=M=>{if(typeof M=="boolean"||typeof M=="number")return M;if(M==="true")return!0;if(M==="false")return!1;if(typeof M=="string"&&(M=parseFloat(M),!isNaN(M)&&M>=0))return M;throw new Error("should be a boolean or a positive number!")},f=M=>{if(typeof M=="object")return M;if(typeof M=="string")try{return JSON.parse(M)}catch{return M}throw new Error("should be a string or JSON!")},d=function({key:M,value:z,expanded:P,indent:q,onToggleExpand:D,level:H=0,parentRow:B}){let G=document.createElement("div");this.maxLevel=H;let K=i(z),Q=K==="array"||K==="object",R=P===!0||P>H,V,X,j,I;G.className=`data-row ${R?"expanded":""}`,G.dataset.key=M,G.dataset.level=H,H>0&&(G.style.paddingLeft=`${q*5}px`);let U=document.createElement("span");U.className="key-value-wrapper",G.appendChild(U);let Y=()=>{G.classList.toggle("expanded"),D&&(G.classList.contains("expanded")?D(H+1):D(H))};if(Q){let le=document.createElement("span");le.className="icon-wrapper",U.appendChild(le),V=document.createElement("span"),V.className="expand icon clickable",V.setAttribute("title",R?"Collapse":"Expand"),le.appendChild(V),le.addEventListener("click",()=>Y())}if(M!==null&&M!==""){let le=typeof M;j=document.createElement("span"),j.className=`key clickable ${le==="number"?"number":""}`,j.textContent=le==="number"?M:`${M}`,j.addEventListener("click",()=>Y()),U.appendChild(j);let W=document.createElement("span");W.classList.add("colon"),W.textContent=":",U.appendChild(W)}if(Q){let le=document.createElement("span");le.className="opening-parenthesis",le.textContent=K==="array"?"[":"{",U.appendChild(le);let W=document.createElement("span");W.className="ellipsis clickable",W.textContent="...",W.addEventListener("click",()=>Y()),U.appendChild(W);let J=document.createElement("span");J.className="closing-parenthesis",J.textContent=K==="array"?"]":"}",U.appendChild(J);let se=document.createElement("span"),fe=K==="array"?z.length:Object.keys(z).length;se.className="items-size",se.textContent=`${fe} item${fe===1?"":"s"}`,U.appendChild(se),X=[],(K==="array"?z.map((xe,we)=>we):Object.keys(z)).forEach(xe=>{let we=new d({key:xe,value:z[xe],expanded:P,indent:q,onToggleExpand:D,level:H+1,parentRow:G});X.push(we),G.appendChild(we.element),this.maxLevel=Math.max(this.maxLevel,we.maxLevel)});let me=document.createElement("span");me.className="closing-parenthesis",me.textContent=K==="array"?"]":"}",G.appendChild(me)}else{let le=null;["nan","NaN","undefined","null"].includes(K)||(le=document.createElement("span"),le.className="type",le.textContent=K.toLowerCase());let W=document.createElement("span");W.className=`value ${K.toLowerCase()}`,I=document.createElement("span"),I.className="value-data",I.textContent=K==="string"?`"${z}"`:z,le&&W.appendChild(le),W.appendChild(I),U.appendChild(W)}let ne=document.createElement("span");ne.className="copy icon",ne.setAttribute("title","Copy to clipboard");let ae=document.createElement("span");ae.className="icon-wrapper",ae.addEventListener("click",()=>{navigator.clipboard.writeText(JSON.stringify(z,null,q))}),ae.appendChild(ne),U.appendChild(ae);let re=le=>{let W=new RegExp(le,"gi"),J=[];j&&J.push(j),I&&J.push(I);let se=!1;J.forEach(fe=>{let me=fe.textContent;if(fe.innerHTML=me,!le||le==="")return;let xe=[...me.matchAll(W)].map(qe=>qe.index),we=[],Ve=0;xe.forEach(qe=>{se=!0,we.push(me.slice(Ve,qe)),we.push(`<span class="match">${le}</span>`),Ve=qe+le.length}),we.push(me.slice(Ve)),fe.innerHTML=we.join("")}),se&&!G.classList.contains("expanded")&&(Y(),B&&B.classList.add("expanded"))};this.update=({expanded:le,indent:W,searchTerm:J})=>{W!==void 0&&H>0&&(G.style.paddingLeft=`${W*5}px`),le!==void 0&&(R=le===!0||le>H,G.classList.toggle("expanded",R),V&&(V.title=R?"Collapse":"Expand")),J!=null&&re(J),X&&X.forEach(se=>se.update({expanded:le,indent:W,searchTerm:J}))},this.element=G},h=d,m=function({expanded:M,indent:z,onChange:P,onSearch:q,showDetails:D}){this.indent=z||2,this.expanded=typeof M=="number"?M:2,this.showDetails=D!==!1,this.maxExpandLevel=0;let H,B=document.createElement("div");B.className="toolbar";let G=document.createElement("div");G.className="options",B.appendChild(G);let K=document.createElement("div");K.className="search-wrapper",B.appendChild(K);let Q=document.createElement("div");Q.className="icon-wrapper clickable",G.appendChild(Q);let R=document.createElement("span");R.className="icon refresh",Q.onclick=()=>this.refresh(),Q.appendChild(R);let V=document.createElement("div");V.className="icon-wrapper clickable",G.appendChild(V);let X=document.createElement("span");X.className="icon plus",V.appendChild(X),V.onclick=()=>{this.expanded<this.maxExpandLevel&&(this.expanded+=1),P({expanded:this.expanded})};let j=document.createElement("div");j.className="icon-wrapper clickable",G.appendChild(j);let I=document.createElement("span");I.className="icon minus",j.appendChild(I),j.onclick=()=>{this.expanded>this.maxExpandLevel&&(this.expanded=this.maxExpandLevel),this.expanded>0&&(this.expanded-=1),P({expanded:this.expanded})};let U=document.createElement("div");U.className="icon-wrapper clickable",G.appendChild(U);let Y=document.createElement("span");Y.className="icon indent",U.onclick=()=>{this.indent+=1,P({indent:this.indent})},U.appendChild(Y);let ne=document.createElement("div");ne.className="icon-wrapper clickable",G.appendChild(ne);let ae=document.createElement("span");ae.className="icon outdent",ne.onclick=()=>{this.indent-=1,P({indent:this.indent})},ne.appendChild(ae);let re=document.createElement("div");re.className="icon-wrapper clickable",G.appendChild(re);let le=document.createElement("span");le.className=`icon info ${this.showDetails?"active":""}`,re.onclick=()=>{le.classList.toggle("active"),this.showDetails=!this.showDetails,P({showDetails:this.showDetails})},re.appendChild(le);let W=document.createElement("span");W.className="icon search",K.appendChild(W),H=document.createElement("input"),H.className="search-input",H.placeholder="Search",H.oninput=J=>{q(J.target.value)},K.appendChild(H),this.refresh=()=>{this.expanded=1,this.indent=2,H&&(H.value=""),P({indent:2,expanded:1}),q("")},this.updateShowDetails=J=>{this.showDetails=J,this.showDetails?le.classList.add("active"):le.classList.remove("active")},this.element=B},g=m;function v(M,z={}){let P=document.createElement("div");P.className="container",M.appendChild(P);let q=null,D=null,H={};this.update=({data:B,expanded:G,indent:K,expandIconType:Q,showDataTypes:R,showToolbar:V,showSize:X,showCopy:j})=>{if(B){let U=JSON.stringify(B);H.dataComapreString!==U&&(H.dataComapreString=U,q=new h({key:"",value:B,expanded:G,indent:K,onToggleExpand:Y=>{D&&(D.expanded=Y),H.expanded=Y}}),P.replaceChildren(q.element),H.showToolbar&&D&&(P.prepend(D.element),D.maxExpandLevel=q.maxLevel,D.refresh()))}if(V!==void 0&&H.showToolbar!==V)if(H.showToolbar=V,V)D||(D=new g({expanded:H.expanded,indent:H.indent,onChange:({expanded:U,indent:Y,showDetails:ne})=>{let ae={expanded:U,indent:Y};ne!==void 0&&(ae.showCopy=ne,ae.showSize=ne,ae.showDataTypes=ne),this.update(ae)},onSearch:U=>{q&&q.update({searchTerm:U})}})),q&&(D.maxExpandLevel=q.maxLevel),P.prepend(D.element);else{let U=P.querySelector(".toolbar");U&&U.remove()}let I={};G!==void 0&&H.expanded!==G&&(H.expanded=G,I.expanded=G),K!==void 0&&H.indent!==K&&(H.indent=K,I.indent=K),Object.keys(I).length>0&&q&&q.update(I),j!==void 0&&H.showCopy!==j&&(H.showCopy=j,P.classList.toggle("show-copy",j)),X!==void 0&&H.showSize!==X&&(H.showSize=X,P.classList.toggle("show-size",X),D&&D.updateShowDetails(H.showSize||H.showDataTypes)),R!==void 0&&H.showDataTypes!==R&&(H.showDataTypes=R,P.classList.toggle("show-data-types",R),D&&D.updateShowDetails(H.showSize||H.showDataTypes)),Q!==void 0&&H.expandIconType!==Q&&(P.classList.add(`expand-icon-${Q}`),P.classList.remove(`expand-icon-${H.expandIconType}`),H.expandIconType=Q)},this.update(z)}var w=v,b={indent:2,expanded:1,theme:"default-light",showDataTypes:!0,showToolbar:!1,expandIconType:"arrow",showCopy:!0,showSize:!0,data:null},_=(T=class extends HTMLElement{constructor(){super();ya(this,S);ya(this,x);ya(this,A);ya(this,k);ya(this,O,(...P)=>{console.warn(`JsonViewer${this.id?` (${this.id})`:""}:`,...P)});ya(this,$,(P,q,D,H)=>{try{if(q=D(q),H&&!H.includes(q))throw new Error(`should be one of ${H.join(", ")}`);if(it(this,x)[P]===q)return;it(this,x)[P]=q,it(this,L).call(this)}catch(B){it(this,O).call(this,`Attribute ${P}: ${B.message}`)}});ya(this,L,()=>{it(this,k).update({data:it(this,A),expanded:it(this,x).expanded,expandIconType:it(this,x).expandIconType,indent:it(this,x).indent,showDataTypes:it(this,x).showDataTypes,showToolbar:it(this,x).showToolbar,showSize:it(this,x).showSize,showCopy:it(this,x).showCopy})});wo(this,x,{...b}),wo(this,S,document.createElement("style"));let P=this.attachShadow({mode:"open"}),q=document.createElement("style");q.textContent=`${e}`,P.appendChild(q),P.appendChild(it(this,S)),this.theme=it(this,x).theme,wo(this,k,new w(P,it(this,x)))}static get observedAttributes(){return Object.keys(b).map(P=>P.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase())}set showDataTypes(P){it(this,$).call(this,"showDataTypes",P,a)}set showToolbar(P){it(this,$).call(this,"showToolbar",P,a)}set indent(P){it(this,$).call(this,"indent",P,l)}set expandIconType(P){it(this,$).call(this,"expandIconType",P,o,["arrow","square","circle"])}set expanded(P){it(this,$).call(this,"expanded",P,c)}set showSize(P){it(this,$).call(this,"showSize",P,a)}set showCopy(P){it(this,$).call(this,"showCopy",P,a)}set theme(P){try{if(P=f(P),it(this,x).theme===P&&it(this,S).textContent!=="")return;it(this,S).textContent=n(P),it(this,x).theme=P}catch(q){it(this,O).call(this,`Attribute theme: ${q.message}`)}}set data(P){try{P=f(P);let q=JSON.stringify(P);if(it(this,x).data===q)return;it(this,x).data=q,r(P)?fetch(P).then(D=>D.json()).then(D=>{wo(this,A,D),it(this,L).call(this)}):(wo(this,A,P),it(this,L).call(this))}catch(q){it(this,O).call(this,`Attribute data: ${q.message}`)}}get options(){return it(this,x)}connectedCallback(){window.addEventListener("DOMContentLoaded",()=>{let P=this.textContent;this.textContent="",P&&(this.data=P)})}attributeChangedCallback(P,q,D){if(T.allowedAttributes.indexOf(P)>-1){let H=P.replace(/-([a-z])/g,B=>B[1].toUpperCase());this[H]=D}else it(this,O).call(this,`Attribute ${P} is not supported and will be ignored!`),this.removeAttribute(P)}},S=new WeakMap,x=new WeakMap,A=new WeakMap,k=new WeakMap,O=new WeakMap,$=new WeakMap,L=new WeakMap,De(T,"allowedAttributes",["id"].concat(T.observedAttributes)),T);customElements.get("andypf-json-viewer")||customElements.define("andypf-json-viewer",_)})();var te=Sc();const KI=zn(te),yq=({content:e})=>{const t=()=>typeof e=="string"?N.jsx("div",{className:"text-white whitespace-pre-wrap",children:e}):Array.isArray(e)?e.map((n,r)=>{switch(n.type){case"text":return N.jsx("div",{className:"text-white",children:n.text},r);case"image_url":return N.jsx("div",{className:"mt-2",children:N.jsx("img",{src:n.image_url.url,alt:"用户上传的图片",className:"max-w-[200px] rounded"})},r);case"audio":return N.jsx("div",{className:"mt-2",children:N.jsx("audio",{controls:!0,src:n.audio_url,className:"w-full",children:"您的浏览器不支持音频播放"})},r);default:return N.jsx("div",{className:"text-white whitespace-pre-wrap",children:JSON.stringify(n)},r)}}):N.jsx("div",{className:"text-white whitespace-pre-wrap",children:JSON.stringify(e)});return N.jsx("div",{className:"flex flex-row w-full justify-end",children:N.jsx("div",{className:"flex flex-col w-fit bg-blue-500 rounded-lg text-white border border-blue-100",children:N.jsx("div",{className:"flex flex-col p-4 ",children:t()})})})},My=e=>e.toString(),Qw=({usage_metadata:e,spend_time:t,response_metadata:n,id:r,tool_call_id:i})=>{const a=t?(e.output_tokens||0)*1e3/(t||1):0;return N.jsxs("div",{className:"flex items-center justify-between text-xs text-gray-500 mt-2",children:[N.jsxs("div",{className:"flex items-center gap-3",children:[N.jsx(bq,{usage_metadata:e}),t&&N.jsxs("span",{className:"text-gray-500",children:[(t/1e3).toFixed(2),"s"]}),a&&N.jsxs("span",{className:"text-gray-500",children:[a.toFixed(2)," TPS"]})]}),N.jsxs("div",{className:"flex items-center gap-2",children:[(n==null?void 0:n.model_name)&&N.jsx("span",{className:"text-gray-600",children:n.model_name}),i&&N.jsxs("span",{className:"text-gray-500",children:["Tool: ",i]}),r&&N.jsxs("span",{className:"text-gray-500",children:["ID: ",r]})]})]})},bq=({usage_metadata:e})=>N.jsx("div",{className:"flex items-center gap-1",children:N.jsxs("span",{className:"flex items-center gap-1 group relative",children:[N.jsx("span",{children:"📊"}),My(e.total_tokens||0),N.jsx("div",{className:"hidden group-hover:block absolute bottom-full ml-2 bg-gray-100 p-2 rounded text-xs shadow border",children:N.jsx("div",{className:"flex flex-col gap-1",children:N.jsxs("div",{className:"flex flex-col gap-1",children:[N.jsxs("span",{className:"flex items-center gap-1",children:[N.jsx("span",{children:"📥"}),My(e.input_tokens||0),N.jsxs("div",{children:[" ",JSON.stringify(e.prompt_tokens_details)]})]}),N.jsxs("span",{className:"flex items-center gap-1",children:[N.jsx("span",{children:"📤"}),My(e.output_tokens||0),N.jsxs("div",{children:[" ",JSON.stringify(e.completion_tokens_details)]})]})]})})})]})});var $y={exports:{}},OT;function vq(){return OT||(OT=1,function(e){var t=Object.prototype.hasOwnProperty,n="~";function r(){}Object.create&&(r.prototype=Object.create(null),new r().__proto__||(n=!1));function i(c,f,d){this.fn=c,this.context=f,this.once=d||!1}function a(c,f,d,h,m){if(typeof d!="function")throw new TypeError("The listener must be a function");var g=new i(d,h||c,m),v=n?n+f:f;return c._events[v]?c._events[v].fn?c._events[v]=[c._events[v],g]:c._events[v].push(g):(c._events[v]=g,c._eventsCount++),c}function o(c,f){--c._eventsCount===0?c._events=new r:delete c._events[f]}function l(){this._events=new r,this._eventsCount=0}l.prototype.eventNames=function(){var f=[],d,h;if(this._eventsCount===0)return f;for(h in d=this._events)t.call(d,h)&&f.push(n?h.slice(1):h);return Object.getOwnPropertySymbols?f.concat(Object.getOwnPropertySymbols(d)):f},l.prototype.listeners=function(f){var d=n?n+f:f,h=this._events[d];if(!h)return[];if(h.fn)return[h.fn];for(var m=0,g=h.length,v=new Array(g);m<g;m++)v[m]=h[m].fn;return v},l.prototype.listenerCount=function(f){var d=n?n+f:f,h=this._events[d];return h?h.fn?1:h.length:0},l.prototype.emit=function(f,d,h,m,g,v){var w=n?n+f:f;if(!this._events[w])return!1;var b=this._events[w],_=arguments.length,S,x;if(b.fn){switch(b.once&&this.removeListener(f,b.fn,void 0,!0),_){case 1:return b.fn.call(b.context),!0;case 2:return b.fn.call(b.context,d),!0;case 3:return b.fn.call(b.context,d,h),!0;case 4:return b.fn.call(b.context,d,h,m),!0;case 5:return b.fn.call(b.context,d,h,m,g),!0;case 6:return b.fn.call(b.context,d,h,m,g,v),!0}for(x=1,S=new Array(_-1);x<_;x++)S[x-1]=arguments[x];b.fn.apply(b.context,S)}else{var A=b.length,k;for(x=0;x<A;x++)switch(b[x].once&&this.removeListener(f,b[x].fn,void 0,!0),_){case 1:b[x].fn.call(b[x].context);break;case 2:b[x].fn.call(b[x].context,d);break;case 3:b[x].fn.call(b[x].context,d,h);break;case 4:b[x].fn.call(b[x].context,d,h,m);break;default:if(!S)for(k=1,S=new Array(_-1);k<_;k++)S[k-1]=arguments[k];b[x].fn.apply(b[x].context,S)}}return!0},l.prototype.on=function(f,d,h){return a(this,f,d,h,!1)},l.prototype.once=function(f,d,h){return a(this,f,d,h,!0)},l.prototype.removeListener=function(f,d,h,m){var g=n?n+f:f;if(!this._events[g])return this;if(!d)return o(this,g),this;var v=this._events[g];if(v.fn)v.fn===d&&(!m||v.once)&&(!h||v.context===h)&&o(this,g);else{for(var w=0,b=[],_=v.length;w<_;w++)(v[w].fn!==d||m&&!v[w].once||h&&v[w].context!==h)&&b.push(v[w]);b.length?this._events[g]=b.length===1?b[0]:b:o(this,g)}return this},l.prototype.removeAllListeners=function(f){var d;return f?(d=n?n+f:f,this._events[d]&&o(this,d)):(this._events=new r,this._eventsCount=0),this},l.prototype.off=l.prototype.removeListener,l.prototype.addListener=l.prototype.on,l.prefixed=n,l.EventEmitter=l,e.exports=l}($y)),$y.exports}var _q=vq();const xq=zn(_q);var dt;(function(e){e.assertEqual=i=>{};function t(i){}e.assertIs=t;function n(i){throw new Error}e.assertNever=n,e.arrayToEnum=i=>{const a={};for(const o of i)a[o]=o;return a},e.getValidEnumValues=i=>{const a=e.objectKeys(i).filter(l=>typeof i[i[l]]!="number"),o={};for(const l of a)o[l]=i[l];return e.objectValues(o)},e.objectValues=i=>e.objectKeys(i).map(function(a){return i[a]}),e.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{const a=[];for(const o in i)Object.prototype.hasOwnProperty.call(i,o)&&a.push(o);return a},e.find=(i,a)=>{for(const o of i)if(a(o))return o},e.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&Number.isFinite(i)&&Math.floor(i)===i;function r(i,a=" | "){return i.map(o=>typeof o=="string"?`'${o}'`:o).join(a)}e.joinValues=r,e.jsonStringifyReplacer=(i,a)=>typeof a=="bigint"?a.toString():a})(dt||(dt={}));var NT;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(NT||(NT={}));const Oe=dt.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Aa=e=>{switch(typeof e){case"undefined":return Oe.undefined;case"string":return Oe.string;case"number":return Number.isNaN(e)?Oe.nan:Oe.number;case"boolean":return Oe.boolean;case"function":return Oe.function;case"bigint":return Oe.bigint;case"symbol":return Oe.symbol;case"object":return Array.isArray(e)?Oe.array:e===null?Oe.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?Oe.promise:typeof Map<"u"&&e instanceof Map?Oe.map:typeof Set<"u"&&e instanceof Set?Oe.set:typeof Date<"u"&&e instanceof Date?Oe.date:Oe.object;default:return Oe.unknown}},Ee=dt.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class Mi extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}format(t){const n=t||function(a){return a.message},r={_errors:[]},i=a=>{for(const o of a.issues)if(o.code==="invalid_union")o.unionErrors.map(i);else if(o.code==="invalid_return_type")i(o.returnTypeError);else if(o.code==="invalid_arguments")i(o.argumentsError);else if(o.path.length===0)r._errors.push(n(o));else{let l=r,c=0;for(;c<o.path.length;){const f=o.path[c];c===o.path.length-1?(l[f]=l[f]||{_errors:[]},l[f]._errors.push(n(o))):l[f]=l[f]||{_errors:[]},l=l[f],c++}}};return i(this),r}static assert(t){if(!(t instanceof Mi))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,dt.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=n=>n.message){const n={},r=[];for(const i of this.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(t(i))):r.push(t(i));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}Mi.create=e=>new Mi(e);const Wx=(e,t)=>{let n;switch(e.code){case Ee.invalid_type:e.received===Oe.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case Ee.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,dt.jsonStringifyReplacer)}`;break;case Ee.unrecognized_keys:n=`Unrecognized key(s) in object: ${dt.joinValues(e.keys,", ")}`;break;case Ee.invalid_union:n="Invalid input";break;case Ee.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${dt.joinValues(e.options)}`;break;case Ee.invalid_enum_value:n=`Invalid enum value. Expected ${dt.joinValues(e.options)}, received '${e.received}'`;break;case Ee.invalid_arguments:n="Invalid function arguments";break;case Ee.invalid_return_type:n="Invalid function return type";break;case Ee.invalid_date:n="Invalid date";break;case Ee.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:dt.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case Ee.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case Ee.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case Ee.custom:n="Invalid input";break;case Ee.invalid_intersection_types:n="Intersection results could not be merged";break;case Ee.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case Ee.not_finite:n="Number must be finite";break;default:n=t.defaultError,dt.assertNever(e)}return{message:n}};let wq=Wx;function Sq(){return wq}const Eq=e=>{const{data:t,path:n,errorMaps:r,issueData:i}=e,a=[...n,...i.path||[]],o={...i,path:a};if(i.message!==void 0)return{...i,path:a,message:i.message};let l="";const c=r.filter(f=>!!f).slice().reverse();for(const f of c)l=f(o,{data:t,defaultError:l}).message;return{...i,path:a,message:l}};function Ae(e,t){const n=Sq(),r=Eq({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===Wx?void 0:Wx].filter(i=>!!i)});e.common.issues.push(r)}class sr{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const r=[];for(const i of n){if(i.status==="aborted")return Ue;i.status==="dirty"&&t.dirty(),r.push(i.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){const r=[];for(const i of n){const a=await i.key,o=await i.value;r.push({key:a,value:o})}return sr.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const i of n){const{key:a,value:o}=i;if(a.status==="aborted"||o.status==="aborted")return Ue;a.status==="dirty"&&t.dirty(),o.status==="dirty"&&t.dirty(),a.value!=="__proto__"&&(typeof o.value<"u"||i.alwaysSet)&&(r[a.value]=o.value)}return{status:t.value,value:r}}}const Ue=Object.freeze({status:"aborted"}),Iu=e=>({status:"dirty",value:e}),_r=e=>({status:"valid",value:e}),RT=e=>e.status==="aborted",jT=e=>e.status==="dirty",qo=e=>e.status==="valid",Dh=e=>typeof Promise<"u"&&e instanceof Promise;var Re;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(Re||(Re={}));class Da{constructor(t,n,r,i){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=i}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const MT=(e,t)=>{if(qo(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new Mi(e.common.issues);return this._error=n,this._error}}};function Je(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:i}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:i}:{errorMap:(o,l)=>{const{message:c}=e;return o.code==="invalid_enum_value"?{message:c??l.defaultError}:typeof l.data>"u"?{message:c??r??l.defaultError}:o.code!=="invalid_type"?{message:l.defaultError}:{message:c??n??l.defaultError}},description:i}}class ct{get description(){return this._def.description}_getType(t){return Aa(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:Aa(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new sr,ctx:{common:t.parent.common,data:t.data,parsedType:Aa(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(Dh(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){const r={common:{issues:[],async:(n==null?void 0:n.async)??!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Aa(t)},i=this._parseSync({data:t,path:r.path,parent:r});return MT(r,i)}"~validate"(t){var r,i;const n={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Aa(t)};if(!this["~standard"].async)try{const a=this._parseSync({data:t,path:[],parent:n});return qo(a)?{value:a.value}:{issues:n.common.issues}}catch(a){(i=(r=a==null?void 0:a.message)==null?void 0:r.toLowerCase())!=null&&i.includes("encountered")&&(this["~standard"].async=!0),n.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:n}).then(a=>qo(a)?{value:a.value}:{issues:n.common.issues})}async parseAsync(t,n){const r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){const r={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Aa(t)},i=this._parse({data:t,path:r.path,parent:r}),a=await(Dh(i)?i:Promise.resolve(i));return MT(r,a)}refine(t,n){const r=i=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(i):n;return this._refinement((i,a)=>{const o=t(i),l=()=>a.addIssue({code:Ee.custom,...r(i)});return typeof Promise<"u"&&o instanceof Promise?o.then(c=>c?!0:(l(),!1)):o?!0:(l(),!1)})}refinement(t,n){return this._refinement((r,i)=>t(r)?!0:(i.addIssue(typeof n=="function"?n(r,i):n),!1))}_refinement(t){return new Uo({schema:this,typeName:ke.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:n=>this["~validate"](n)}}optional(){return Ni.create(this,this._def)}nullable(){return Vo.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Kr.create(this)}promise(){return zh.create(this,this._def)}or(t){return Ph.create([this,t],this._def)}and(t){return Lh.create(this,t,this._def)}transform(t){return new Uo({...Je(this._def),schema:this,typeName:ke.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new tw({...Je(this._def),innerType:this,defaultValue:n,typeName:ke.ZodDefault})}brand(){return new Yq({typeName:ke.ZodBranded,type:this,...Je(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new nw({...Je(this._def),innerType:this,catchValue:n,typeName:ke.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return Jw.create(this,t)}readonly(){return rw.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const kq=/^c[^\s-]{8,}$/i,Aq=/^[0-9a-z]+$/,Tq=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Cq=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,Oq=/^[a-z0-9_-]{21}$/i,Nq=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,Rq=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,jq=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Mq="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Dy;const $q=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Dq=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,Iq=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,Pq=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Lq=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,zq=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,XI="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",qq=new RegExp(`^${XI}$`);function WI(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`);const n=e.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${n}`}function Fq(e){return new RegExp(`^${WI(e)}$`)}function Bq(e){let t=`${XI}T${WI(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function Uq(e,t){return!!((t==="v4"||!t)&&$q.test(e)||(t==="v6"||!t)&&Iq.test(e))}function Vq(e,t){if(!Nq.test(e))return!1;try{const[n]=e.split("."),r=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),i=JSON.parse(atob(r));return!(typeof i!="object"||i===null||"typ"in i&&(i==null?void 0:i.typ)!=="JWT"||!i.alg||t&&i.alg!==t)}catch{return!1}}function Hq(e,t){return!!((t==="v4"||!t)&&Dq.test(e)||(t==="v6"||!t)&&Pq.test(e))}class Oa extends ct{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==Oe.string){const a=this._getOrReturnCtx(t);return Ae(a,{code:Ee.invalid_type,expected:Oe.string,received:a.parsedType}),Ue}const r=new sr;let i;for(const a of this._def.checks)if(a.kind==="min")t.data.length<a.value&&(i=this._getOrReturnCtx(t,i),Ae(i,{code:Ee.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),r.dirty());else if(a.kind==="max")t.data.length>a.value&&(i=this._getOrReturnCtx(t,i),Ae(i,{code:Ee.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),r.dirty());else if(a.kind==="length"){const o=t.data.length>a.value,l=t.data.length<a.value;(o||l)&&(i=this._getOrReturnCtx(t,i),o?Ae(i,{code:Ee.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}):l&&Ae(i,{code:Ee.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}),r.dirty())}else if(a.kind==="email")jq.test(t.data)||(i=this._getOrReturnCtx(t,i),Ae(i,{validation:"email",code:Ee.invalid_string,message:a.message}),r.dirty());else if(a.kind==="emoji")Dy||(Dy=new RegExp(Mq,"u")),Dy.test(t.data)||(i=this._getOrReturnCtx(t,i),Ae(i,{validation:"emoji",code:Ee.invalid_string,message:a.message}),r.dirty());else if(a.kind==="uuid")Cq.test(t.data)||(i=this._getOrReturnCtx(t,i),Ae(i,{validation:"uuid",code:Ee.invalid_string,message:a.message}),r.dirty());else if(a.kind==="nanoid")Oq.test(t.data)||(i=this._getOrReturnCtx(t,i),Ae(i,{validation:"nanoid",code:Ee.invalid_string,message:a.message}),r.dirty());else if(a.kind==="cuid")kq.test(t.data)||(i=this._getOrReturnCtx(t,i),Ae(i,{validation:"cuid",code:Ee.invalid_string,message:a.message}),r.dirty());else if(a.kind==="cuid2")Aq.test(t.data)||(i=this._getOrReturnCtx(t,i),Ae(i,{validation:"cuid2",code:Ee.invalid_string,message:a.message}),r.dirty());else if(a.kind==="ulid")Tq.test(t.data)||(i=this._getOrReturnCtx(t,i),Ae(i,{validation:"ulid",code:Ee.invalid_string,message:a.message}),r.dirty());else if(a.kind==="url")try{new URL(t.data)}catch{i=this._getOrReturnCtx(t,i),Ae(i,{validation:"url",code:Ee.invalid_string,message:a.message}),r.dirty()}else a.kind==="regex"?(a.regex.lastIndex=0,a.regex.test(t.data)||(i=this._getOrReturnCtx(t,i),Ae(i,{validation:"regex",code:Ee.invalid_string,message:a.message}),r.dirty())):a.kind==="trim"?t.data=t.data.trim():a.kind==="includes"?t.data.includes(a.value,a.position)||(i=this._getOrReturnCtx(t,i),Ae(i,{code:Ee.invalid_string,validation:{includes:a.value,position:a.position},message:a.message}),r.dirty()):a.kind==="toLowerCase"?t.data=t.data.toLowerCase():a.kind==="toUpperCase"?t.data=t.data.toUpperCase():a.kind==="startsWith"?t.data.startsWith(a.value)||(i=this._getOrReturnCtx(t,i),Ae(i,{code:Ee.invalid_string,validation:{startsWith:a.value},message:a.message}),r.dirty()):a.kind==="endsWith"?t.data.endsWith(a.value)||(i=this._getOrReturnCtx(t,i),Ae(i,{code:Ee.invalid_string,validation:{endsWith:a.value},message:a.message}),r.dirty()):a.kind==="datetime"?Bq(a).test(t.data)||(i=this._getOrReturnCtx(t,i),Ae(i,{code:Ee.invalid_string,validation:"datetime",message:a.message}),r.dirty()):a.kind==="date"?qq.test(t.data)||(i=this._getOrReturnCtx(t,i),Ae(i,{code:Ee.invalid_string,validation:"date",message:a.message}),r.dirty()):a.kind==="time"?Fq(a).test(t.data)||(i=this._getOrReturnCtx(t,i),Ae(i,{code:Ee.invalid_string,validation:"time",message:a.message}),r.dirty()):a.kind==="duration"?Rq.test(t.data)||(i=this._getOrReturnCtx(t,i),Ae(i,{validation:"duration",code:Ee.invalid_string,message:a.message}),r.dirty()):a.kind==="ip"?Uq(t.data,a.version)||(i=this._getOrReturnCtx(t,i),Ae(i,{validation:"ip",code:Ee.invalid_string,message:a.message}),r.dirty()):a.kind==="jwt"?Vq(t.data,a.alg)||(i=this._getOrReturnCtx(t,i),Ae(i,{validation:"jwt",code:Ee.invalid_string,message:a.message}),r.dirty()):a.kind==="cidr"?Hq(t.data,a.version)||(i=this._getOrReturnCtx(t,i),Ae(i,{validation:"cidr",code:Ee.invalid_string,message:a.message}),r.dirty()):a.kind==="base64"?Lq.test(t.data)||(i=this._getOrReturnCtx(t,i),Ae(i,{validation:"base64",code:Ee.invalid_string,message:a.message}),r.dirty()):a.kind==="base64url"?zq.test(t.data)||(i=this._getOrReturnCtx(t,i),Ae(i,{validation:"base64url",code:Ee.invalid_string,message:a.message}),r.dirty()):dt.assertNever(a);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(i=>t.test(i),{validation:n,code:Ee.invalid_string,...Re.errToObj(r)})}_addCheck(t){return new Oa({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...Re.errToObj(t)})}url(t){return this._addCheck({kind:"url",...Re.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...Re.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...Re.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...Re.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...Re.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...Re.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...Re.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...Re.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...Re.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...Re.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...Re.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...Re.errToObj(t)})}datetime(t){return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(t==null?void 0:t.offset)??!1,local:(t==null?void 0:t.local)??!1,...Re.errToObj(t==null?void 0:t.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,...Re.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...Re.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...Re.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...Re.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...Re.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...Re.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...Re.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...Re.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...Re.errToObj(n)})}nonempty(t){return this.min(1,Re.errToObj(t))}trim(){return new Oa({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Oa({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Oa({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return!!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}Oa.create=e=>new Oa({checks:[],typeName:ke.ZodString,coerce:(e==null?void 0:e.coerce)??!1,...Je(e)});function Gq(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,i=n>r?n:r,a=Number.parseInt(e.toFixed(i).replace(".","")),o=Number.parseInt(t.toFixed(i).replace(".",""));return a%o/10**i}class Fo extends ct{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==Oe.number){const a=this._getOrReturnCtx(t);return Ae(a,{code:Ee.invalid_type,expected:Oe.number,received:a.parsedType}),Ue}let r;const i=new sr;for(const a of this._def.checks)a.kind==="int"?dt.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),Ae(r,{code:Ee.invalid_type,expected:"integer",received:"float",message:a.message}),i.dirty()):a.kind==="min"?(a.inclusive?t.data<a.value:t.data<=a.value)&&(r=this._getOrReturnCtx(t,r),Ae(r,{code:Ee.too_small,minimum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),i.dirty()):a.kind==="max"?(a.inclusive?t.data>a.value:t.data>=a.value)&&(r=this._getOrReturnCtx(t,r),Ae(r,{code:Ee.too_big,maximum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),i.dirty()):a.kind==="multipleOf"?Gq(t.data,a.value)!==0&&(r=this._getOrReturnCtx(t,r),Ae(r,{code:Ee.not_multiple_of,multipleOf:a.value,message:a.message}),i.dirty()):a.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),Ae(r,{code:Ee.not_finite,message:a.message}),i.dirty()):dt.assertNever(a);return{status:i.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,Re.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Re.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Re.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Re.toString(n))}setLimit(t,n,r,i){return new Fo({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Re.toString(i)}]})}_addCheck(t){return new Fo({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:Re.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Re.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Re.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Re.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Re.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Re.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:Re.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Re.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Re.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&dt.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(t===null||r.value<t)&&(t=r.value)}return Number.isFinite(n)&&Number.isFinite(t)}}Fo.create=e=>new Fo({checks:[],typeName:ke.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...Je(e)});class Ju extends ct{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==Oe.bigint)return this._getInvalidInput(t);let r;const i=new sr;for(const a of this._def.checks)a.kind==="min"?(a.inclusive?t.data<a.value:t.data<=a.value)&&(r=this._getOrReturnCtx(t,r),Ae(r,{code:Ee.too_small,type:"bigint",minimum:a.value,inclusive:a.inclusive,message:a.message}),i.dirty()):a.kind==="max"?(a.inclusive?t.data>a.value:t.data>=a.value)&&(r=this._getOrReturnCtx(t,r),Ae(r,{code:Ee.too_big,type:"bigint",maximum:a.value,inclusive:a.inclusive,message:a.message}),i.dirty()):a.kind==="multipleOf"?t.data%a.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),Ae(r,{code:Ee.not_multiple_of,multipleOf:a.value,message:a.message}),i.dirty()):dt.assertNever(a);return{status:i.value,value:t.data}}_getInvalidInput(t){const n=this._getOrReturnCtx(t);return Ae(n,{code:Ee.invalid_type,expected:Oe.bigint,received:n.parsedType}),Ue}gte(t,n){return this.setLimit("min",t,!0,Re.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Re.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Re.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Re.toString(n))}setLimit(t,n,r,i){return new Ju({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Re.toString(i)}]})}_addCheck(t){return new Ju({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Re.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Re.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Re.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Re.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Re.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}Ju.create=e=>new Ju({checks:[],typeName:ke.ZodBigInt,coerce:(e==null?void 0:e.coerce)??!1,...Je(e)});class Qx extends ct{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==Oe.boolean){const r=this._getOrReturnCtx(t);return Ae(r,{code:Ee.invalid_type,expected:Oe.boolean,received:r.parsedType}),Ue}return _r(t.data)}}Qx.create=e=>new Qx({typeName:ke.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...Je(e)});class Ih extends ct{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==Oe.date){const a=this._getOrReturnCtx(t);return Ae(a,{code:Ee.invalid_type,expected:Oe.date,received:a.parsedType}),Ue}if(Number.isNaN(t.data.getTime())){const a=this._getOrReturnCtx(t);return Ae(a,{code:Ee.invalid_date}),Ue}const r=new sr;let i;for(const a of this._def.checks)a.kind==="min"?t.data.getTime()<a.value&&(i=this._getOrReturnCtx(t,i),Ae(i,{code:Ee.too_small,message:a.message,inclusive:!0,exact:!1,minimum:a.value,type:"date"}),r.dirty()):a.kind==="max"?t.data.getTime()>a.value&&(i=this._getOrReturnCtx(t,i),Ae(i,{code:Ee.too_big,message:a.message,inclusive:!0,exact:!1,maximum:a.value,type:"date"}),r.dirty()):dt.assertNever(a);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new Ih({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:Re.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:Re.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t!=null?new Date(t):null}}Ih.create=e=>new Ih({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:ke.ZodDate,...Je(e)});class $T extends ct{_parse(t){if(this._getType(t)!==Oe.symbol){const r=this._getOrReturnCtx(t);return Ae(r,{code:Ee.invalid_type,expected:Oe.symbol,received:r.parsedType}),Ue}return _r(t.data)}}$T.create=e=>new $T({typeName:ke.ZodSymbol,...Je(e)});class DT extends ct{_parse(t){if(this._getType(t)!==Oe.undefined){const r=this._getOrReturnCtx(t);return Ae(r,{code:Ee.invalid_type,expected:Oe.undefined,received:r.parsedType}),Ue}return _r(t.data)}}DT.create=e=>new DT({typeName:ke.ZodUndefined,...Je(e)});class IT extends ct{_parse(t){if(this._getType(t)!==Oe.null){const r=this._getOrReturnCtx(t);return Ae(r,{code:Ee.invalid_type,expected:Oe.null,received:r.parsedType}),Ue}return _r(t.data)}}IT.create=e=>new IT({typeName:ke.ZodNull,...Je(e)});class Jx extends ct{constructor(){super(...arguments),this._any=!0}_parse(t){return _r(t.data)}}Jx.create=e=>new Jx({typeName:ke.ZodAny,...Je(e)});class PT extends ct{constructor(){super(...arguments),this._unknown=!0}_parse(t){return _r(t.data)}}PT.create=e=>new PT({typeName:ke.ZodUnknown,...Je(e)});class Ia extends ct{_parse(t){const n=this._getOrReturnCtx(t);return Ae(n,{code:Ee.invalid_type,expected:Oe.never,received:n.parsedType}),Ue}}Ia.create=e=>new Ia({typeName:ke.ZodNever,...Je(e)});class LT extends ct{_parse(t){if(this._getType(t)!==Oe.undefined){const r=this._getOrReturnCtx(t);return Ae(r,{code:Ee.invalid_type,expected:Oe.void,received:r.parsedType}),Ue}return _r(t.data)}}LT.create=e=>new LT({typeName:ke.ZodVoid,...Je(e)});class Kr extends ct{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),i=this._def;if(n.parsedType!==Oe.array)return Ae(n,{code:Ee.invalid_type,expected:Oe.array,received:n.parsedType}),Ue;if(i.exactLength!==null){const o=n.data.length>i.exactLength.value,l=n.data.length<i.exactLength.value;(o||l)&&(Ae(n,{code:o?Ee.too_big:Ee.too_small,minimum:l?i.exactLength.value:void 0,maximum:o?i.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:i.exactLength.message}),r.dirty())}if(i.minLength!==null&&n.data.length<i.minLength.value&&(Ae(n,{code:Ee.too_small,minimum:i.minLength.value,type:"array",inclusive:!0,exact:!1,message:i.minLength.message}),r.dirty()),i.maxLength!==null&&n.data.length>i.maxLength.value&&(Ae(n,{code:Ee.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((o,l)=>i.type._parseAsync(new Da(n,o,n.path,l)))).then(o=>sr.mergeArray(r,o));const a=[...n.data].map((o,l)=>i.type._parseSync(new Da(n,o,n.path,l)));return sr.mergeArray(r,a)}get element(){return this._def.type}min(t,n){return new Kr({...this._def,minLength:{value:t,message:Re.toString(n)}})}max(t,n){return new Kr({...this._def,maxLength:{value:t,message:Re.toString(n)}})}length(t,n){return new Kr({...this._def,exactLength:{value:t,message:Re.toString(n)}})}nonempty(t){return this.min(1,t)}}Kr.create=(e,t)=>new Kr({type:e,minLength:null,maxLength:null,exactLength:null,typeName:ke.ZodArray,...Je(t)});function Ro(e){if(e instanceof Qt){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=Ni.create(Ro(r))}return new Qt({...e._def,shape:()=>t})}else return e instanceof Kr?new Kr({...e._def,type:Ro(e.element)}):e instanceof Ni?Ni.create(Ro(e.unwrap())):e instanceof Vo?Vo.create(Ro(e.unwrap())):e instanceof vs?vs.create(e.items.map(t=>Ro(t))):e}class Qt extends ct{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=dt.objectKeys(t);return this._cached={shape:t,keys:n},this._cached}_parse(t){if(this._getType(t)!==Oe.object){const f=this._getOrReturnCtx(t);return Ae(f,{code:Ee.invalid_type,expected:Oe.object,received:f.parsedType}),Ue}const{status:r,ctx:i}=this._processInputParams(t),{shape:a,keys:o}=this._getCached(),l=[];if(!(this._def.catchall instanceof Ia&&this._def.unknownKeys==="strip"))for(const f in i.data)o.includes(f)||l.push(f);const c=[];for(const f of o){const d=a[f],h=i.data[f];c.push({key:{status:"valid",value:f},value:d._parse(new Da(i,h,i.path,f)),alwaysSet:f in i.data})}if(this._def.catchall instanceof Ia){const f=this._def.unknownKeys;if(f==="passthrough")for(const d of l)c.push({key:{status:"valid",value:d},value:{status:"valid",value:i.data[d]}});else if(f==="strict")l.length>0&&(Ae(i,{code:Ee.unrecognized_keys,keys:l}),r.dirty());else if(f!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const f=this._def.catchall;for(const d of l){const h=i.data[d];c.push({key:{status:"valid",value:d},value:f._parse(new Da(i,h,i.path,d)),alwaysSet:d in i.data})}}return i.common.async?Promise.resolve().then(async()=>{const f=[];for(const d of c){const h=await d.key,m=await d.value;f.push({key:h,value:m,alwaysSet:d.alwaysSet})}return f}).then(f=>sr.mergeObjectSync(r,f)):sr.mergeObjectSync(r,c)}get shape(){return this._def.shape()}strict(t){return Re.errToObj,new Qt({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var a,o;const i=((o=(a=this._def).errorMap)==null?void 0:o.call(a,n,r).message)??r.defaultError;return n.code==="unrecognized_keys"?{message:Re.errToObj(t).message??i}:{message:i}}}:{}})}strip(){return new Qt({...this._def,unknownKeys:"strip"})}passthrough(){return new Qt({...this._def,unknownKeys:"passthrough"})}extend(t){return new Qt({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new Qt({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:ke.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new Qt({...this._def,catchall:t})}pick(t){const n={};for(const r of dt.objectKeys(t))t[r]&&this.shape[r]&&(n[r]=this.shape[r]);return new Qt({...this._def,shape:()=>n})}omit(t){const n={};for(const r of dt.objectKeys(this.shape))t[r]||(n[r]=this.shape[r]);return new Qt({...this._def,shape:()=>n})}deepPartial(){return Ro(this)}partial(t){const n={};for(const r of dt.objectKeys(this.shape)){const i=this.shape[r];t&&!t[r]?n[r]=i:n[r]=i.optional()}return new Qt({...this._def,shape:()=>n})}required(t){const n={};for(const r of dt.objectKeys(this.shape))if(t&&!t[r])n[r]=this.shape[r];else{let a=this.shape[r];for(;a instanceof Ni;)a=a._def.innerType;n[r]=a}return new Qt({...this._def,shape:()=>n})}keyof(){return QI(dt.objectKeys(this.shape))}}Qt.create=(e,t)=>new Qt({shape:()=>e,unknownKeys:"strip",catchall:Ia.create(),typeName:ke.ZodObject,...Je(t)});Qt.strictCreate=(e,t)=>new Qt({shape:()=>e,unknownKeys:"strict",catchall:Ia.create(),typeName:ke.ZodObject,...Je(t)});Qt.lazycreate=(e,t)=>new Qt({shape:e,unknownKeys:"strip",catchall:Ia.create(),typeName:ke.ZodObject,...Je(t)});class Ph extends ct{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function i(a){for(const l of a)if(l.result.status==="valid")return l.result;for(const l of a)if(l.result.status==="dirty")return n.common.issues.push(...l.ctx.common.issues),l.result;const o=a.map(l=>new Mi(l.ctx.common.issues));return Ae(n,{code:Ee.invalid_union,unionErrors:o}),Ue}if(n.common.async)return Promise.all(r.map(async a=>{const o={...n,common:{...n.common,issues:[]},parent:null};return{result:await a._parseAsync({data:n.data,path:n.path,parent:o}),ctx:o}})).then(i);{let a;const o=[];for(const c of r){const f={...n,common:{...n.common,issues:[]},parent:null},d=c._parseSync({data:n.data,path:n.path,parent:f});if(d.status==="valid")return d;d.status==="dirty"&&!a&&(a={result:d,ctx:f}),f.common.issues.length&&o.push(f.common.issues)}if(a)return n.common.issues.push(...a.ctx.common.issues),a.result;const l=o.map(c=>new Mi(c));return Ae(n,{code:Ee.invalid_union,unionErrors:l}),Ue}}get options(){return this._def.options}}Ph.create=(e,t)=>new Ph({options:e,typeName:ke.ZodUnion,...Je(t)});function ew(e,t){const n=Aa(e),r=Aa(t);if(e===t)return{valid:!0,data:e};if(n===Oe.object&&r===Oe.object){const i=dt.objectKeys(t),a=dt.objectKeys(e).filter(l=>i.indexOf(l)!==-1),o={...e,...t};for(const l of a){const c=ew(e[l],t[l]);if(!c.valid)return{valid:!1};o[l]=c.data}return{valid:!0,data:o}}else if(n===Oe.array&&r===Oe.array){if(e.length!==t.length)return{valid:!1};const i=[];for(let a=0;a<e.length;a++){const o=e[a],l=t[a],c=ew(o,l);if(!c.valid)return{valid:!1};i.push(c.data)}return{valid:!0,data:i}}else return n===Oe.date&&r===Oe.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class Lh extends ct{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),i=(a,o)=>{if(RT(a)||RT(o))return Ue;const l=ew(a.value,o.value);return l.valid?((jT(a)||jT(o))&&n.dirty(),{status:n.value,value:l.data}):(Ae(r,{code:Ee.invalid_intersection_types}),Ue)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([a,o])=>i(a,o)):i(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}Lh.create=(e,t,n)=>new Lh({left:e,right:t,typeName:ke.ZodIntersection,...Je(n)});class vs extends ct{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Oe.array)return Ae(r,{code:Ee.invalid_type,expected:Oe.array,received:r.parsedType}),Ue;if(r.data.length<this._def.items.length)return Ae(r,{code:Ee.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Ue;!this._def.rest&&r.data.length>this._def.items.length&&(Ae(r,{code:Ee.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const a=[...r.data].map((o,l)=>{const c=this._def.items[l]||this._def.rest;return c?c._parse(new Da(r,o,r.path,l)):null}).filter(o=>!!o);return r.common.async?Promise.all(a).then(o=>sr.mergeArray(n,o)):sr.mergeArray(n,a)}get items(){return this._def.items}rest(t){return new vs({...this._def,rest:t})}}vs.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new vs({items:e,typeName:ke.ZodTuple,rest:null,...Je(t)})};class zT extends ct{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Oe.map)return Ae(r,{code:Ee.invalid_type,expected:Oe.map,received:r.parsedType}),Ue;const i=this._def.keyType,a=this._def.valueType,o=[...r.data.entries()].map(([l,c],f)=>({key:i._parse(new Da(r,l,r.path,[f,"key"])),value:a._parse(new Da(r,c,r.path,[f,"value"]))}));if(r.common.async){const l=new Map;return Promise.resolve().then(async()=>{for(const c of o){const f=await c.key,d=await c.value;if(f.status==="aborted"||d.status==="aborted")return Ue;(f.status==="dirty"||d.status==="dirty")&&n.dirty(),l.set(f.value,d.value)}return{status:n.value,value:l}})}else{const l=new Map;for(const c of o){const f=c.key,d=c.value;if(f.status==="aborted"||d.status==="aborted")return Ue;(f.status==="dirty"||d.status==="dirty")&&n.dirty(),l.set(f.value,d.value)}return{status:n.value,value:l}}}}zT.create=(e,t,n)=>new zT({valueType:t,keyType:e,typeName:ke.ZodMap,...Je(n)});class ec extends ct{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Oe.set)return Ae(r,{code:Ee.invalid_type,expected:Oe.set,received:r.parsedType}),Ue;const i=this._def;i.minSize!==null&&r.data.size<i.minSize.value&&(Ae(r,{code:Ee.too_small,minimum:i.minSize.value,type:"set",inclusive:!0,exact:!1,message:i.minSize.message}),n.dirty()),i.maxSize!==null&&r.data.size>i.maxSize.value&&(Ae(r,{code:Ee.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),n.dirty());const a=this._def.valueType;function o(c){const f=new Set;for(const d of c){if(d.status==="aborted")return Ue;d.status==="dirty"&&n.dirty(),f.add(d.value)}return{status:n.value,value:f}}const l=[...r.data.values()].map((c,f)=>a._parse(new Da(r,c,r.path,f)));return r.common.async?Promise.all(l).then(c=>o(c)):o(l)}min(t,n){return new ec({...this._def,minSize:{value:t,message:Re.toString(n)}})}max(t,n){return new ec({...this._def,maxSize:{value:t,message:Re.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}ec.create=(e,t)=>new ec({valueType:e,minSize:null,maxSize:null,typeName:ke.ZodSet,...Je(t)});class qT extends ct{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}qT.create=(e,t)=>new qT({getter:e,typeName:ke.ZodLazy,...Je(t)});class FT extends ct{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return Ae(n,{received:n.data,code:Ee.invalid_literal,expected:this._def.value}),Ue}return{status:"valid",value:t.data}}get value(){return this._def.value}}FT.create=(e,t)=>new FT({value:e,typeName:ke.ZodLiteral,...Je(t)});function QI(e,t){return new Bo({values:e,typeName:ke.ZodEnum,...Je(t)})}class Bo extends ct{_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return Ae(n,{expected:dt.joinValues(r),received:n.parsedType,code:Ee.invalid_type}),Ue}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(t.data)){const n=this._getOrReturnCtx(t),r=this._def.values;return Ae(n,{received:n.data,code:Ee.invalid_enum_value,options:r}),Ue}return _r(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t,n=this._def){return Bo.create(t,{...this._def,...n})}exclude(t,n=this._def){return Bo.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}Bo.create=QI;class BT extends ct{_parse(t){const n=dt.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==Oe.string&&r.parsedType!==Oe.number){const i=dt.objectValues(n);return Ae(r,{expected:dt.joinValues(i),received:r.parsedType,code:Ee.invalid_type}),Ue}if(this._cache||(this._cache=new Set(dt.getValidEnumValues(this._def.values))),!this._cache.has(t.data)){const i=dt.objectValues(n);return Ae(r,{received:r.data,code:Ee.invalid_enum_value,options:i}),Ue}return _r(t.data)}get enum(){return this._def.values}}BT.create=(e,t)=>new BT({values:e,typeName:ke.ZodNativeEnum,...Je(t)});class zh extends ct{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==Oe.promise&&n.common.async===!1)return Ae(n,{code:Ee.invalid_type,expected:Oe.promise,received:n.parsedType}),Ue;const r=n.parsedType===Oe.promise?n.data:Promise.resolve(n.data);return _r(r.then(i=>this._def.type.parseAsync(i,{path:n.path,errorMap:n.common.contextualErrorMap})))}}zh.create=(e,t)=>new zh({type:e,typeName:ke.ZodPromise,...Je(t)});class Uo extends ct{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===ke.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),i=this._def.effect||null,a={addIssue:o=>{Ae(r,o),o.fatal?n.abort():n.dirty()},get path(){return r.path}};if(a.addIssue=a.addIssue.bind(a),i.type==="preprocess"){const o=i.transform(r.data,a);if(r.common.async)return Promise.resolve(o).then(async l=>{if(n.value==="aborted")return Ue;const c=await this._def.schema._parseAsync({data:l,path:r.path,parent:r});return c.status==="aborted"?Ue:c.status==="dirty"||n.value==="dirty"?Iu(c.value):c});{if(n.value==="aborted")return Ue;const l=this._def.schema._parseSync({data:o,path:r.path,parent:r});return l.status==="aborted"?Ue:l.status==="dirty"||n.value==="dirty"?Iu(l.value):l}}if(i.type==="refinement"){const o=l=>{const c=i.refinement(l,a);if(r.common.async)return Promise.resolve(c);if(c instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return l};if(r.common.async===!1){const l=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return l.status==="aborted"?Ue:(l.status==="dirty"&&n.dirty(),o(l.value),{status:n.value,value:l.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(l=>l.status==="aborted"?Ue:(l.status==="dirty"&&n.dirty(),o(l.value).then(()=>({status:n.value,value:l.value}))))}if(i.type==="transform")if(r.common.async===!1){const o=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!qo(o))return Ue;const l=i.transform(o.value,a);if(l instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:l}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(o=>qo(o)?Promise.resolve(i.transform(o.value,a)).then(l=>({status:n.value,value:l})):Ue);dt.assertNever(i)}}Uo.create=(e,t,n)=>new Uo({schema:e,typeName:ke.ZodEffects,effect:t,...Je(n)});Uo.createWithPreprocess=(e,t,n)=>new Uo({schema:t,effect:{type:"preprocess",transform:e},typeName:ke.ZodEffects,...Je(n)});class Ni extends ct{_parse(t){return this._getType(t)===Oe.undefined?_r(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Ni.create=(e,t)=>new Ni({innerType:e,typeName:ke.ZodOptional,...Je(t)});class Vo extends ct{_parse(t){return this._getType(t)===Oe.null?_r(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Vo.create=(e,t)=>new Vo({innerType:e,typeName:ke.ZodNullable,...Je(t)});class tw extends ct{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===Oe.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}tw.create=(e,t)=>new tw({innerType:e,typeName:ke.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Je(t)});class nw extends ct{_parse(t){const{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},i=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return Dh(i)?i.then(a=>({status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new Mi(r.common.issues)},input:r.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Mi(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}nw.create=(e,t)=>new nw({innerType:e,typeName:ke.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Je(t)});class UT extends ct{_parse(t){if(this._getType(t)!==Oe.nan){const r=this._getOrReturnCtx(t);return Ae(r,{code:Ee.invalid_type,expected:Oe.nan,received:r.parsedType}),Ue}return{status:"valid",value:t.data}}}UT.create=e=>new UT({typeName:ke.ZodNaN,...Je(e)});class Yq extends ct{_parse(t){const{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class Jw extends ct{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const a=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?Ue:a.status==="dirty"?(n.dirty(),Iu(a.value)):this._def.out._parseAsync({data:a.value,path:r.path,parent:r})})();{const i=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?Ue:i.status==="dirty"?(n.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:r.path,parent:r})}}static create(t,n){return new Jw({in:t,out:n,typeName:ke.ZodPipeline})}}class rw extends ct{_parse(t){const n=this._def.innerType._parse(t),r=i=>(qo(i)&&(i.value=Object.freeze(i.value)),i);return Dh(n)?n.then(i=>r(i)):r(n)}unwrap(){return this._def.innerType}}rw.create=(e,t)=>new rw({innerType:e,typeName:ke.ZodReadonly,...Je(t)});var ke;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(ke||(ke={}));const Zq=Oa.create,Kq=Fo.create,Xq=Qx.create,Wq=Jx.create;Ia.create;const Qq=Kr.create,_h=Qt.create;Ph.create;Lh.create;vs.create;Bo.create;zh.create;Ni.create;Vo.create;function Jq(e){let t={};for(let r of e||[])t[r.name]=JI(r);let n=[];for(let r of e||[])r.required!==!1&&n.push(r.name);return{type:"object",properties:t,required:n}}function JI(e){var t,n,r;switch(e.type){case"string":return{type:"string",description:e.description,...e.enum&&{enum:e.enum}};case"number":case"boolean":return{type:e.type,description:e.description};case"object":case"object[]":const i=(t=e.attributes)==null?void 0:t.reduce((o,l)=>(o[l.name]=JI(l),o),{}),a=(n=e.attributes)==null?void 0:n.filter(o=>o.required!==!1).map(o=>o.name);return e.type==="object[]"?{type:"array",items:{type:"object",...i&&{properties:i},...a&&a.length>0&&{required:a}},description:e.description}:{type:"object",description:e.description,...i&&{properties:i},...a&&a.length>0&&{required:a}};default:return(r=e.type)!=null&&r.endsWith("[]")?{type:"array",items:{type:e.type.slice(0,-2)},description:e.description}:{type:"string",description:e.description}}}function eF(e){const t={};for(const[n,r]of Object.entries(e.properties))t[n]=iw(r,e.required?e.required.includes(n):!1);return t}function iw(e,t){if(e.type==="object"){const n={};if(!e.properties||!Object.keys(e.properties).length)return t?_h(n):_h(n).optional();for(const[i,a]of Object.entries(e.properties))n[i]=iw(a,e.required?e.required.includes(i):!1);let r=_h(n).describe(e.description);return t?r:r.optional()}else if(e.type==="string"){let n=Zq().describe(e.description);return t?n:n.optional()}else if(e.type==="number"){let n=Kq().describe(e.description);return t?n:n.optional()}else if(e.type==="boolean"){let n=Xq().describe(e.description);return t?n:n.optional()}else if(e.type==="array"){let n=iw(e.items,!0),r=Qq(n).describe(e.description);return t?r:r.optional()}throw new Error("Invalid JSON schema")}const tF=Symbol("Let zodToJsonSchema decide on which parser to use"),nF={name:void 0,$refStrategy:"root",basePath:["#"],effectStrategy:"input",pipeStrategy:"all",dateStrategy:"format:date-time",mapStrategy:"entries",removeAdditionalStrategy:"passthrough",allowedAdditionalProperties:!0,rejectedAdditionalProperties:!1,definitionPath:"definitions",target:"jsonSchema7",strictUnions:!1,definitions:{},errorMessages:!1,markdownDescription:!1,patternStrategy:"escape",applyRegexFlags:!1,emailStrategy:"format:email",base64Strategy:"contentEncoding:base64",nameStrategy:"ref"},rF=e=>({...nF,...e}),iF=e=>{const t=rF(e),n=t.name!==void 0?[...t.basePath,t.definitionPath,t.name]:t.basePath;return{...t,currentPath:n,propertyPath:void 0,seen:new Map(Object.entries(t.definitions).map(([r,i])=>[i._def,{def:i._def,path:[...t.basePath,t.definitionPath,r],jsonSchema:void 0}]))}};function e3(e,t,n,r){r!=null&&r.errorMessages&&n&&(e.errorMessage={...e.errorMessage,[t]:n})}function xt(e,t,n,r,i){e[t]=n,e3(e,t,r,i)}function aF(){return{}}function sF(e,t){var r,i,a;const n={type:"array"};return(r=e.type)!=null&&r._def&&((a=(i=e.type)==null?void 0:i._def)==null?void 0:a.typeName)!==ke.ZodAny&&(n.items=gt(e.type._def,{...t,currentPath:[...t.currentPath,"items"]})),e.minLength&&xt(n,"minItems",e.minLength.value,e.minLength.message,t),e.maxLength&&xt(n,"maxItems",e.maxLength.value,e.maxLength.message,t),e.exactLength&&(xt(n,"minItems",e.exactLength.value,e.exactLength.message,t),xt(n,"maxItems",e.exactLength.value,e.exactLength.message,t)),n}function oF(e,t){const n={type:"integer",format:"int64"};if(!e.checks)return n;for(const r of e.checks)switch(r.kind){case"min":t.target==="jsonSchema7"?r.inclusive?xt(n,"minimum",r.value,r.message,t):xt(n,"exclusiveMinimum",r.value,r.message,t):(r.inclusive||(n.exclusiveMinimum=!0),xt(n,"minimum",r.value,r.message,t));break;case"max":t.target==="jsonSchema7"?r.inclusive?xt(n,"maximum",r.value,r.message,t):xt(n,"exclusiveMaximum",r.value,r.message,t):(r.inclusive||(n.exclusiveMaximum=!0),xt(n,"maximum",r.value,r.message,t));break;case"multipleOf":xt(n,"multipleOf",r.value,r.message,t);break}return n}function lF(){return{type:"boolean"}}function t3(e,t){return gt(e.type._def,t)}const uF=(e,t)=>gt(e.innerType._def,t);function n3(e,t,n){const r=n??t.dateStrategy;if(Array.isArray(r))return{anyOf:r.map((i,a)=>n3(e,t,i))};switch(r){case"string":case"format:date-time":return{type:"string",format:"date-time"};case"format:date":return{type:"string",format:"date"};case"integer":return cF(e,t)}}const cF=(e,t)=>{const n={type:"integer",format:"unix-time"};if(t.target==="openApi3")return n;for(const r of e.checks)switch(r.kind){case"min":xt(n,"minimum",r.value,r.message,t);break;case"max":xt(n,"maximum",r.value,r.message,t);break}return n};function fF(e,t){return{...gt(e.innerType._def,t),default:e.defaultValue()}}function dF(e,t){return t.effectStrategy==="input"?gt(e.schema._def,t):{}}function hF(e){return{type:"string",enum:Array.from(e.values)}}const pF=e=>"type"in e&&e.type==="string"?!1:"allOf"in e;function mF(e,t){const n=[gt(e.left._def,{...t,currentPath:[...t.currentPath,"allOf","0"]}),gt(e.right._def,{...t,currentPath:[...t.currentPath,"allOf","1"]})].filter(a=>!!a);let r=t.target==="jsonSchema2019-09"?{unevaluatedProperties:!1}:void 0;const i=[];return n.forEach(a=>{if(pF(a))i.push(...a.allOf),a.unevaluatedProperties===void 0&&(r=void 0);else{let o=a;if("additionalProperties"in a&&a.additionalProperties===!1){const{additionalProperties:l,...c}=a;o=c}else r=void 0;i.push(o)}}),i.length?{allOf:i,...r}:void 0}function gF(e,t){const n=typeof e.value;return n!=="bigint"&&n!=="number"&&n!=="boolean"&&n!=="string"?{type:Array.isArray(e.value)?"array":"object"}:t.target==="openApi3"?{type:n==="bigint"?"integer":n,enum:[e.value]}:{type:n==="bigint"?"integer":n,const:e.value}}let Iy;const kr={cuid:/^[cC][^\s-]{8,}$/,cuid2:/^[0-9a-z]+$/,ulid:/^[0-9A-HJKMNP-TV-Z]{26}$/,email:/^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-\.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9\-]*\.)+[a-zA-Z]{2,}$/,emoji:()=>(Iy===void 0&&(Iy=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),Iy),uuid:/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/,ipv4:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,ipv4Cidr:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,ipv6:/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,ipv6Cidr:/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,base64:/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,base64url:/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,nanoid:/^[a-zA-Z0-9_-]{21}$/,jwt:/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/};function r3(e,t){const n={type:"string"};if(e.checks)for(const r of e.checks)switch(r.kind){case"min":xt(n,"minLength",typeof n.minLength=="number"?Math.max(n.minLength,r.value):r.value,r.message,t);break;case"max":xt(n,"maxLength",typeof n.maxLength=="number"?Math.min(n.maxLength,r.value):r.value,r.message,t);break;case"email":switch(t.emailStrategy){case"format:email":Ar(n,"email",r.message,t);break;case"format:idn-email":Ar(n,"idn-email",r.message,t);break;case"pattern:zod":En(n,kr.email,r.message,t);break}break;case"url":Ar(n,"uri",r.message,t);break;case"uuid":Ar(n,"uuid",r.message,t);break;case"regex":En(n,r.regex,r.message,t);break;case"cuid":En(n,kr.cuid,r.message,t);break;case"cuid2":En(n,kr.cuid2,r.message,t);break;case"startsWith":En(n,RegExp(`^${Py(r.value,t)}`),r.message,t);break;case"endsWith":En(n,RegExp(`${Py(r.value,t)}$`),r.message,t);break;case"datetime":Ar(n,"date-time",r.message,t);break;case"date":Ar(n,"date",r.message,t);break;case"time":Ar(n,"time",r.message,t);break;case"duration":Ar(n,"duration",r.message,t);break;case"length":xt(n,"minLength",typeof n.minLength=="number"?Math.max(n.minLength,r.value):r.value,r.message,t),xt(n,"maxLength",typeof n.maxLength=="number"?Math.min(n.maxLength,r.value):r.value,r.message,t);break;case"includes":{En(n,RegExp(Py(r.value,t)),r.message,t);break}case"ip":{r.version!=="v6"&&Ar(n,"ipv4",r.message,t),r.version!=="v4"&&Ar(n,"ipv6",r.message,t);break}case"base64url":En(n,kr.base64url,r.message,t);break;case"jwt":En(n,kr.jwt,r.message,t);break;case"cidr":{r.version!=="v6"&&En(n,kr.ipv4Cidr,r.message,t),r.version!=="v4"&&En(n,kr.ipv6Cidr,r.message,t);break}case"emoji":En(n,kr.emoji(),r.message,t);break;case"ulid":{En(n,kr.ulid,r.message,t);break}case"base64":{switch(t.base64Strategy){case"format:binary":{Ar(n,"binary",r.message,t);break}case"contentEncoding:base64":{xt(n,"contentEncoding","base64",r.message,t);break}case"pattern:zod":{En(n,kr.base64,r.message,t);break}}break}case"nanoid":En(n,kr.nanoid,r.message,t)}return n}function Py(e,t){return t.patternStrategy==="escape"?bF(e):e}const yF=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function bF(e){let t="";for(let n=0;n<e.length;n++)yF.has(e[n])||(t+="\\"),t+=e[n];return t}function Ar(e,t,n,r){var i;e.format||(i=e.anyOf)!=null&&i.some(a=>a.format)?(e.anyOf||(e.anyOf=[]),e.format&&(e.anyOf.push({format:e.format,...e.errorMessage&&r.errorMessages&&{errorMessage:{format:e.errorMessage.format}}}),delete e.format,e.errorMessage&&(delete e.errorMessage.format,Object.keys(e.errorMessage).length===0&&delete e.errorMessage)),e.anyOf.push({format:t,...n&&r.errorMessages&&{errorMessage:{format:n}}})):xt(e,"format",t,n,r)}function En(e,t,n,r){var i;e.pattern||(i=e.allOf)!=null&&i.some(a=>a.pattern)?(e.allOf||(e.allOf=[]),e.pattern&&(e.allOf.push({pattern:e.pattern,...e.errorMessage&&r.errorMessages&&{errorMessage:{pattern:e.errorMessage.pattern}}}),delete e.pattern,e.errorMessage&&(delete e.errorMessage.pattern,Object.keys(e.errorMessage).length===0&&delete e.errorMessage)),e.allOf.push({pattern:VT(t,r),...n&&r.errorMessages&&{errorMessage:{pattern:n}}})):xt(e,"pattern",VT(t,r),n,r)}function VT(e,t){var c;if(!t.applyRegexFlags||!e.flags)return e.source;const n={i:e.flags.includes("i"),m:e.flags.includes("m"),s:e.flags.includes("s")},r=n.i?e.source.toLowerCase():e.source;let i="",a=!1,o=!1,l=!1;for(let f=0;f<r.length;f++){if(a){i+=r[f],a=!1;continue}if(n.i){if(o){if(r[f].match(/[a-z]/)){l?(i+=r[f],i+=`${r[f-2]}-${r[f]}`.toUpperCase(),l=!1):r[f+1]==="-"&&((c=r[f+2])!=null&&c.match(/[a-z]/))?(i+=r[f],l=!0):i+=`${r[f]}${r[f].toUpperCase()}`;continue}}else if(r[f].match(/[a-z]/)){i+=`[${r[f]}${r[f].toUpperCase()}]`;continue}}if(n.m){if(r[f]==="^"){i+=`(^|(?<=[\r
|
|
51
|
+
]))`;continue}else if(r[f]==="$"){i+=`($|(?=[\r
|
|
52
|
+
]))`;continue}}if(n.s&&r[f]==="."){i+=o?`${r[f]}\r
|
|
53
|
+
`:`[${r[f]}\r
|
|
54
|
+
]`;continue}i+=r[f],r[f]==="\\"?a=!0:o&&r[f]==="]"?o=!1:!o&&r[f]==="["&&(o=!0)}try{new RegExp(i)}catch{return console.warn(`Could not convert regex pattern at ${t.currentPath.join("/")} to a flag-independent form! Falling back to the flag-ignorant source`),e.source}return i}function i3(e,t){var r,i,a,o,l,c;if(t.target==="openAi"&&console.warn("Warning: OpenAI may not support records in schemas! Try an array of key-value pairs instead."),t.target==="openApi3"&&((r=e.keyType)==null?void 0:r._def.typeName)===ke.ZodEnum)return{type:"object",required:e.keyType._def.values,properties:e.keyType._def.values.reduce((f,d)=>({...f,[d]:gt(e.valueType._def,{...t,currentPath:[...t.currentPath,"properties",d]})??{}}),{}),additionalProperties:t.rejectedAdditionalProperties};const n={type:"object",additionalProperties:gt(e.valueType._def,{...t,currentPath:[...t.currentPath,"additionalProperties"]})??t.allowedAdditionalProperties};if(t.target==="openApi3")return n;if(((i=e.keyType)==null?void 0:i._def.typeName)===ke.ZodString&&((a=e.keyType._def.checks)!=null&&a.length)){const{type:f,...d}=r3(e.keyType._def,t);return{...n,propertyNames:d}}else{if(((o=e.keyType)==null?void 0:o._def.typeName)===ke.ZodEnum)return{...n,propertyNames:{enum:e.keyType._def.values}};if(((l=e.keyType)==null?void 0:l._def.typeName)===ke.ZodBranded&&e.keyType._def.type._def.typeName===ke.ZodString&&((c=e.keyType._def.type._def.checks)!=null&&c.length)){const{type:f,...d}=t3(e.keyType._def,t);return{...n,propertyNames:d}}}return n}function vF(e,t){if(t.mapStrategy==="record")return i3(e,t);const n=gt(e.keyType._def,{...t,currentPath:[...t.currentPath,"items","items","0"]})||{},r=gt(e.valueType._def,{...t,currentPath:[...t.currentPath,"items","items","1"]})||{};return{type:"array",maxItems:125,items:{type:"array",items:[n,r],minItems:2,maxItems:2}}}function _F(e){const t=e.values,r=Object.keys(e.values).filter(a=>typeof t[t[a]]!="number").map(a=>t[a]),i=Array.from(new Set(r.map(a=>typeof a)));return{type:i.length===1?i[0]==="string"?"string":"number":["string","number"],enum:r}}function xF(){return{not:{}}}function wF(e){return e.target==="openApi3"?{enum:["null"],nullable:!0}:{type:"null"}}const qh={ZodString:"string",ZodNumber:"number",ZodBigInt:"integer",ZodBoolean:"boolean",ZodNull:"null"};function SF(e,t){if(t.target==="openApi3")return HT(e,t);const n=e.options instanceof Map?Array.from(e.options.values()):e.options;if(n.every(r=>r._def.typeName in qh&&(!r._def.checks||!r._def.checks.length))){const r=n.reduce((i,a)=>{const o=qh[a._def.typeName];return o&&!i.includes(o)?[...i,o]:i},[]);return{type:r.length>1?r:r[0]}}else if(n.every(r=>r._def.typeName==="ZodLiteral"&&!r.description)){const r=n.reduce((i,a)=>{const o=typeof a._def.value;switch(o){case"string":case"number":case"boolean":return[...i,o];case"bigint":return[...i,"integer"];case"object":if(a._def.value===null)return[...i,"null"];case"symbol":case"undefined":case"function":default:return i}},[]);if(r.length===n.length){const i=r.filter((a,o,l)=>l.indexOf(a)===o);return{type:i.length>1?i:i[0],enum:n.reduce((a,o)=>a.includes(o._def.value)?a:[...a,o._def.value],[])}}}else if(n.every(r=>r._def.typeName==="ZodEnum"))return{type:"string",enum:n.reduce((r,i)=>[...r,...i._def.values.filter(a=>!r.includes(a))],[])};return HT(e,t)}const HT=(e,t)=>{const n=(e.options instanceof Map?Array.from(e.options.values()):e.options).map((r,i)=>gt(r._def,{...t,currentPath:[...t.currentPath,"anyOf",`${i}`]})).filter(r=>!!r&&(!t.strictUnions||typeof r=="object"&&Object.keys(r).length>0));return n.length?{anyOf:n}:void 0};function EF(e,t){if(["ZodString","ZodNumber","ZodBigInt","ZodBoolean","ZodNull"].includes(e.innerType._def.typeName)&&(!e.innerType._def.checks||!e.innerType._def.checks.length))return t.target==="openApi3"?{type:qh[e.innerType._def.typeName],nullable:!0}:{type:[qh[e.innerType._def.typeName],"null"]};if(t.target==="openApi3"){const r=gt(e.innerType._def,{...t,currentPath:[...t.currentPath]});return r&&"$ref"in r?{allOf:[r],nullable:!0}:r&&{...r,nullable:!0}}const n=gt(e.innerType._def,{...t,currentPath:[...t.currentPath,"anyOf","0"]});return n&&{anyOf:[n,{type:"null"}]}}function kF(e,t){const n={type:"number"};if(!e.checks)return n;for(const r of e.checks)switch(r.kind){case"int":n.type="integer",e3(n,"type",r.message,t);break;case"min":t.target==="jsonSchema7"?r.inclusive?xt(n,"minimum",r.value,r.message,t):xt(n,"exclusiveMinimum",r.value,r.message,t):(r.inclusive||(n.exclusiveMinimum=!0),xt(n,"minimum",r.value,r.message,t));break;case"max":t.target==="jsonSchema7"?r.inclusive?xt(n,"maximum",r.value,r.message,t):xt(n,"exclusiveMaximum",r.value,r.message,t):(r.inclusive||(n.exclusiveMaximum=!0),xt(n,"maximum",r.value,r.message,t));break;case"multipleOf":xt(n,"multipleOf",r.value,r.message,t);break}return n}function AF(e,t){const n=t.target==="openAi",r={type:"object",properties:{}},i=[],a=e.shape();for(const l in a){let c=a[l];if(c===void 0||c._def===void 0)continue;let f=CF(c);f&&n&&(c instanceof Ni&&(c=c._def.innerType),c.isNullable()||(c=c.nullable()),f=!1);const d=gt(c._def,{...t,currentPath:[...t.currentPath,"properties",l],propertyPath:[...t.currentPath,"properties",l]});d!==void 0&&(r.properties[l]=d,f||i.push(l))}i.length&&(r.required=i);const o=TF(e,t);return o!==void 0&&(r.additionalProperties=o),r}function TF(e,t){if(e.catchall._def.typeName!=="ZodNever")return gt(e.catchall._def,{...t,currentPath:[...t.currentPath,"additionalProperties"]});switch(e.unknownKeys){case"passthrough":return t.allowedAdditionalProperties;case"strict":return t.rejectedAdditionalProperties;case"strip":return t.removeAdditionalStrategy==="strict"?t.allowedAdditionalProperties:t.rejectedAdditionalProperties}}function CF(e){try{return e.isOptional()}catch{return!0}}const OF=(e,t)=>{var r;if(t.currentPath.toString()===((r=t.propertyPath)==null?void 0:r.toString()))return gt(e.innerType._def,t);const n=gt(e.innerType._def,{...t,currentPath:[...t.currentPath,"anyOf","1"]});return n?{anyOf:[{not:{}},n]}:{}},NF=(e,t)=>{if(t.pipeStrategy==="input")return gt(e.in._def,t);if(t.pipeStrategy==="output")return gt(e.out._def,t);const n=gt(e.in._def,{...t,currentPath:[...t.currentPath,"allOf","0"]}),r=gt(e.out._def,{...t,currentPath:[...t.currentPath,"allOf",n?"1":"0"]});return{allOf:[n,r].filter(i=>i!==void 0)}};function RF(e,t){return gt(e.type._def,t)}function jF(e,t){const r={type:"array",uniqueItems:!0,items:gt(e.valueType._def,{...t,currentPath:[...t.currentPath,"items"]})};return e.minSize&&xt(r,"minItems",e.minSize.value,e.minSize.message,t),e.maxSize&&xt(r,"maxItems",e.maxSize.value,e.maxSize.message,t),r}function MF(e,t){return e.rest?{type:"array",minItems:e.items.length,items:e.items.map((n,r)=>gt(n._def,{...t,currentPath:[...t.currentPath,"items",`${r}`]})).reduce((n,r)=>r===void 0?n:[...n,r],[]),additionalItems:gt(e.rest._def,{...t,currentPath:[...t.currentPath,"additionalItems"]})}:{type:"array",minItems:e.items.length,maxItems:e.items.length,items:e.items.map((n,r)=>gt(n._def,{...t,currentPath:[...t.currentPath,"items",`${r}`]})).reduce((n,r)=>r===void 0?n:[...n,r],[])}}function $F(){return{not:{}}}function DF(){return{}}const IF=(e,t)=>gt(e.innerType._def,t),PF=(e,t,n)=>{switch(t){case ke.ZodString:return r3(e,n);case ke.ZodNumber:return kF(e,n);case ke.ZodObject:return AF(e,n);case ke.ZodBigInt:return oF(e,n);case ke.ZodBoolean:return lF();case ke.ZodDate:return n3(e,n);case ke.ZodUndefined:return $F();case ke.ZodNull:return wF(n);case ke.ZodArray:return sF(e,n);case ke.ZodUnion:case ke.ZodDiscriminatedUnion:return SF(e,n);case ke.ZodIntersection:return mF(e,n);case ke.ZodTuple:return MF(e,n);case ke.ZodRecord:return i3(e,n);case ke.ZodLiteral:return gF(e,n);case ke.ZodEnum:return hF(e);case ke.ZodNativeEnum:return _F(e);case ke.ZodNullable:return EF(e,n);case ke.ZodOptional:return OF(e,n);case ke.ZodMap:return vF(e,n);case ke.ZodSet:return jF(e,n);case ke.ZodLazy:return()=>e.getter()._def;case ke.ZodPromise:return RF(e,n);case ke.ZodNaN:case ke.ZodNever:return xF();case ke.ZodEffects:return dF(e,n);case ke.ZodAny:return aF();case ke.ZodUnknown:return DF();case ke.ZodDefault:return fF(e,n);case ke.ZodBranded:return t3(e,n);case ke.ZodReadonly:return IF(e,n);case ke.ZodCatch:return uF(e,n);case ke.ZodPipeline:return NF(e,n);case ke.ZodFunction:case ke.ZodVoid:case ke.ZodSymbol:return;default:return(r=>{})()}};function gt(e,t,n=!1){var l;const r=t.seen.get(e);if(t.override){const c=(l=t.override)==null?void 0:l.call(t,e,t,r,n);if(c!==tF)return c}if(r&&!n){const c=LF(r,t);if(c!==void 0)return c}const i={def:e,path:t.currentPath,jsonSchema:void 0};t.seen.set(e,i);const a=PF(e,e.typeName,t),o=typeof a=="function"?gt(a(),t):a;if(o&&qF(e,t,o),t.postProcess){const c=t.postProcess(o,e,t);return i.jsonSchema=o,c}return i.jsonSchema=o,o}const LF=(e,t)=>{switch(t.$refStrategy){case"root":return{$ref:e.path.join("/")};case"relative":return{$ref:zF(t.currentPath,e.path)};case"none":case"seen":return e.path.length<t.currentPath.length&&e.path.every((n,r)=>t.currentPath[r]===n)?(console.warn(`Recursive reference detected at ${t.currentPath.join("/")}! Defaulting to any`),{}):t.$refStrategy==="seen"?{}:void 0}},zF=(e,t)=>{let n=0;for(;n<e.length&&n<t.length&&e[n]===t[n];n++);return[(e.length-n).toString(),...t.slice(n)].join("/")},qF=(e,t,n)=>(e.description&&(n.description=e.description,t.markdownDescription&&(n.markdownDescription=e.description)),n),FF=(e,t)=>{const n=iF(t),r=void 0,i=t==null?void 0:t.name,a=gt(e._def,n,!1)??{},o=i===void 0?r?{...a,[n.definitionPath]:r}:a:{$ref:[...n.$refStrategy==="relative"?[]:n.basePath,n.definitionPath,i].join("/"),[n.definitionPath]:{...r,[i]:a}};return n.target==="jsonSchema7"?o.$schema="http://json-schema.org/draft-07/schema#":(n.target==="jsonSchema2019-09"||n.target==="openAi")&&(o.$schema="https://json-schema.org/draft/2019-09/schema#"),n.target==="openAi"&&("anyOf"in o||"oneOf"in o||"allOf"in o||"type"in o&&Array.isArray(o.type))&&console.warn("Warning: OpenAI may not support schemas with unions as roots! Try wrapping it in an object property."),o},a3=e=>{const t=e.execute||(async(n,r)=>{var i;try{const a=await((i=e.handler)==null?void 0:i.call(e,n,r));return typeof a=="string"?[{type:"text",text:a}]:[{type:"text",text:JSON.stringify(a)}]}catch(a){return[{type:"text",text:`Error: ${a}`}]}});return{...e,execute:t}},BF=e=>({render:e.render,onlyRender:e.onlyRender,name:e.name,description:e.description||"",parameters:eF(Jq(e.parameters||[])),returnDirect:e.returnDirect,callbackMessage:e.callbackMessage,allowAgent:e.allowAgent,allowGraph:e.allowGraph,async execute(t,n){var r;try{const i=await((r=e.handler)==null?void 0:r.call(e,t,n));return typeof i=="string"?[{type:"text",text:i}]:[{type:"text",text:JSON.stringify(i)}]}catch(i){return[{type:"text",text:`Error: ${i}`}]}}}),UF=e=>({name:e.name,description:e.description,parameters:e.isPureParams?e.parameters:FF(_h(e.parameters))}),GT=BF;class s3{constructor(){this.tools=new Map,this.waitingMap=new Map}bindTool(t){if(this.tools.has(t.name))throw new Error(`Tool with name ${t.name} already exists`);this.tools.set(t.name,t)}bindTools(t){t.forEach(n=>this.bindTool(n))}getAllTools(){return Array.from(this.tools.values())}getTool(t){return this.tools.get(t)}removeTool(t){return this.tools.delete(t)}clearTools(){this.tools.clear()}reset(){this.clearTools(),this.clearWaiting()}clearWaiting(){this.waitingMap.clear()}async callTool(t,n,r){var a;const i=this.getTool(t);if(!i)throw new Error(`Tool with name ${t} not found`);return await((a=i.execute)==null?void 0:a.call(i,n,r))}async toJSON(t,n=!0){return Array.from(this.tools.values()).filter(r=>n?!r.onlyRender:!0).filter(r=>!r.allowGraph||r.allowGraph.includes(t)).map(r=>UF(r))}doneWaiting(t,n){return this.waitingMap.has(t)?(this.waitingMap.get(t)(n),this.waitingMap.delete(t),!0):(console.warn(`Waiting for tool ${t} not found`),!1)}waitForDone(t){return this.waitingMap.has(t)?this.waitingMap.get(t):new Promise((r,i)=>{this.waitingMap.set(t,r)})}static waitForUIDone(t,n){return n.client.tools.waitForDone(n.message.id)}}class Ly{static isTool(t){return t.type==="tool"}static isToolAssistant(t){var n,r;return t.type==="ai"&&(((n=t.tool_calls)==null?void 0:n.length)||((r=t.tool_call_chunks)==null?void 0:r.length))}}class VF{constructor(t="task_store"){this.streamingMessage=[],this.graphMessages=[],this.subAgentsKey=t}getStreamingMessages(){return[...this.streamingMessage]}setStreamingMessages(t){this.streamingMessage=t}clearStreamingMessages(){this.streamingMessage=[]}getGraphMessages(){return[...this.graphMessages]}setGraphMessages(t){this.graphMessages=t}updateStreamingMessage(t){const n=this.streamingMessage[this.streamingMessage.length-1];if(!(n!=null&&n.id)||t.id!==n.id){this.streamingMessage.push(t);return}this.streamingMessage[this.streamingMessage.length-1]=t}combineGraphMessagesWithStreamingMessages(){const t=new Map(this.streamingMessage.map(n=>[n.id,n]));return[...this.graphMessages.map(n=>{if(t.has(n.id)){const r=t.get(n.id);return t.delete(n.id),r}return n}),...t.values()]}mergeSubGraphMessagesToStreamingMessages(t){const n=new Map(t.filter(r=>r.id).map(r=>[r.id,r]));this.streamingMessage.forEach(r=>{if(n.has(r.id)){const i=n.get(r.id);Object.assign(r,i),n.delete(r.id)}}),n.forEach(r=>{r.type==="tool"&&r.tool_call_id&&this.streamingMessage.push(r)})}cloneMessage(t){return JSON.parse(JSON.stringify(t))}attachInfoForMessage(t){var i,a,o;let n=null;const r=[...t];for(const l of r){const c=((i=l.response_metadata)==null?void 0:i.create_time)||"";if(l.unique_id=l.tool_call_id||l.id,l.spend_time=new Date(c).getTime()-new Date(((a=n==null?void 0:n.response_metadata)==null?void 0:a.create_time)||c).getTime(),!l.usage_metadata&&((o=l.response_metadata)!=null&&o.usage)){const f=l.response_metadata.usage;l.usage_metadata={...f,input_tokens:f.prompt_tokens,output_tokens:f.completion_tokens,total_tokens:f.total_tokens}}n=l}return r}composeToolMessages(t){var a,o;const n=[],r=new Map,i=new Map;for(const l of t)if(!(Ly.isToolAssistant(l)&&((a=l.tool_calls||l.tool_call_chunks)==null||a.forEach(c=>{r.set(c.id,c),i.set(c.id,l)}),!l.content))){if(Ly.isTool(l)&&!l.tool_input){const c=r.get(l.tool_call_id),f=i.get(l.tool_call_id);c&&(l.tool_input=typeof c.args!="string"?JSON.stringify(c.args):c.args,l.additional_kwargs?(l.additional_kwargs.done=!0,l.done=!0):(l.done=!0,l.additional_kwargs={done:!0})),f&&(l.usage_metadata=f.usage_metadata,l.node_name=f.name,l.name||(l.name=(o=f.tool_calls.find(d=>d.id===l.tool_call_id))==null?void 0:o.name))}n.push(l)}return n}convertSubAgentMessages(t,n){const r=n[this.subAgentsKey];if(!r)return t;const i=JSON.parse(JSON.stringify(r));t.filter(l=>{var c;return(c=l.node_name)==null?void 0:c.startsWith("subagent_")}).forEach(l=>{const c=l.node_name.replace("subagent_",""),f=i[c];f?f.messages.some(h=>h.id===l.id)||f.messages.push(l):i[c]={messages:[l]}});const a=new Set;Object.values(i).forEach(l=>{l.messages.forEach(c=>{a.add(c.id)})});const o=[];for(const l of t){if(l.type==="tool"&&l.tool_call_id){const c=i[l.tool_call_id];c&&(l.sub_agent_messages=this.processMessages(c.messages))}l.id&&a.has(l.id)||o.push(l)}return o}renderMessages(t,n){var l;const r=new Map,i=new Set,a=[],o=this.combineGraphMessagesWithStreamingMessages();for(let c=o.length-1;c>=0;c--){const f=this.cloneMessage(o[c]);if(!f.id){a.unshift(f);continue}if(f.type==="ai"&&(f.name||(f.name=n().name)),Ly.isToolAssistant(f)){const d=f;r.set(f.id,d);const m=((l=d.tool_calls)!=null&&l.length?d.tool_calls:d.tool_call_chunks).filter(g=>!i.has(g.id)).map((g,v)=>{var w,b,_,S;return{type:"tool",additional_kwargs:{},tool_input:(S=(_=(b=(w=d.additional_kwargs)==null?void 0:w.tool_calls)==null?void 0:b[v])==null?void 0:_.function)==null?void 0:S.arguments,id:g.id,name:g.name,response_metadata:{},tool_call_id:g.id,content:""}});for(const g of m)r.has(g.id)||(a.unshift(g),r.set(g.id,g));a.unshift(d)}else f.type==="tool"&&f.tool_call_id&&i.add(f.tool_call_id),r.set(f.id,f),a.unshift(f)}return this.processMessages(a,t)}processMessages(t,n){const r=this.composeToolMessages(t),i=this.attachInfoForMessage(r);return n?this.convertSubAgentMessages(i,n):i}}class HF extends xq{constructor(t){super(),this.currentAssistant=null,this.currentThread=null,this.tools=new s3,this.availableAssistants=[],this.graphState={},this.stopController=null,this.subAgentsKey="task_store",this.graphPosition="",this.extraParams={},this.client=t.client,this.messageProcessor=new VF(this.subAgentsKey)}get assistants(){return this.client.assistants}get threads(){return this.client.threads}get runs(){return this.client.runs}listAssistants(){return this.assistants.search({metadata:null,offset:0,limit:100})}async initAssistant(t){try{const n=await this.listAssistants();if(this.availableAssistants=n,n.length>0)if(t){if(this.currentAssistant=n.find(r=>r.graph_id===t)||null,!this.currentAssistant)throw new Error("Agent not found: "+t)}else this.currentAssistant=n[0];else throw new Error("No assistants found")}catch(n){throw console.error("Failed to initialize LangGraphClient:",n),n}}async createThread({threadId:t}={}){try{return this.currentThread=await this.threads.create({threadId:t}),this.currentThread}catch(n){throw console.error("Failed to create new thread:",n),n}}graphVisualize(){var t;return this.assistants.getGraph((t=this.currentAssistant)==null?void 0:t.assistant_id,{xray:!0})}async listThreads(){return this.threads.search({sortOrder:"desc"})}async deleteThread(t){return this.threads.delete(t)}async resetThread(t,n){var i;await this.initAssistant(t),this.currentThread=await this.threads.get(n),this.graphState=this.currentThread.values;const r=((i=this.graphState)==null?void 0:i.messages)||[];return this.messageProcessor.setGraphMessages(r),this.emit("value",{event:"messages/partial",data:{messages:this.messageProcessor.getGraphMessages()}}),this.currentThread}async resetStream(){const t=await this.runs.list(this.currentThread.thread_id),n=t==null?void 0:t.find(r=>r.status==="running"||r.status==="pending");n&&await this.sendMessage([],{joinRunId:n.run_id})}cloneMessage(t){return this.messageProcessor.cloneMessage(t)}get renderMessage(){return this.messageProcessor.renderMessages(this.graphState,()=>this.getGraphNodeNow())}get tokenCounter(){return this.messageProcessor.getGraphMessages().reduce((t,n)=>{var r,i,a,o,l;if(n.usage_metadata)t.total_tokens+=((r=n.usage_metadata)==null?void 0:r.total_tokens)||0,t.input_tokens+=((i=n.usage_metadata)==null?void 0:i.input_tokens)||0,t.output_tokens+=((a=n.usage_metadata)==null?void 0:a.output_tokens)||0;else if((o=n.response_metadata)!=null&&o.usage){const c=(l=n.response_metadata)==null?void 0:l.usage;t.total_tokens+=c.total_tokens||0,t.input_tokens+=c.prompt_tokens||0,t.output_tokens+=c.completion_tokens||0}return t},{total_tokens:0,input_tokens:0,output_tokens:0})}isFELocking(t){var i;const n=t[t.length-1];if(!n)return!1;const r=this.tools.getTool(n==null?void 0:n.name);return r&&r.render&&(n==null?void 0:n.type)==="tool"&&!((i=n==null?void 0:n.additional_kwargs)!=null&&i.done)}cancelRun(){var t,n;(t=this.currentThread)!=null&&t.thread_id&&((n=this.currentRun)!=null&&n.run_id)&&this.runs.cancel(this.currentThread.thread_id,this.currentRun.run_id)}async sendMessage(t,{joinRunId:n,extraParams:r,_debug:i,command:a}={}){var h;if(!this.currentAssistant)throw new Error("Thread or Assistant not initialized");this.currentThread||(await this.createThread(),this.emit("thread",{event:"thread/create",data:{thread:this.currentThread}}));const o=Array.isArray(t)?t:[{type:"human",content:t}],c=await(async()=>i!=null&&i.streamResponse?i.streamResponse:n?this.runs.joinStream(this.currentThread.thread_id,n):this.runs.stream(this.currentThread.thread_id,this.currentAssistant.assistant_id,{input:{...this.graphState,...this.extraParams,...r||{},messages:o,fe_tools:await this.tools.toJSON(this.currentAssistant.graph_id)},streamMode:["messages","values"],streamSubgraphs:!0,command:a}))(),f=[];this.emit("start",{event:"start"});for await(const m of c)if(f.push(m),m.event==="metadata")this.currentRun=m.data;else if(m.event==="error")this.emit("error",m);else if(m.event==="messages/partial"){for(const g of m.data)this.messageProcessor.updateStreamingMessage(g);this.emit("message",m);continue}else if(m.event==="values"){const g=m.data;if(g.messages){const v=!!(a!=null&&a.resume),w=g.messages.length>=this.messageProcessor.getGraphMessages().length;(!v||v&&w)&&(this.messageProcessor.setGraphMessages(g.messages),this.emit("value",m)),this.graphState=m.data}continue}else m.event.startsWith("values|")&&((h=m.data)!=null&&h.messages&&this.messageProcessor.mergeSubGraphMessagesToStreamingMessages(m.data.messages),this.graphPosition=m.event.split("|")[1]);const d=await this.runFETool();return d&&f.push(...d),this.emit("done",{event:"done"}),this.messageProcessor.clearStreamingMessages(),f}getGraphPosition(){return this.graphPosition.split("|").map(t=>{const[n,r]=t.split(":");return{id:r,name:n}})}getGraphNodeNow(){const t=this.getGraphPosition();return t[t.length-1]}runFETool(){var r;const t=this.messageProcessor.getStreamingMessages(),n=t[t.length-1];if(n&&n.type==="ai"&&(r=n.tool_calls)!=null&&r.length){const i=n.tool_calls.map(a=>{if(this.tools.getTool(a.name)){const o={...a,tool_call_id:a.id,tool_input:JSON.stringify(a.args),additional_kwargs:{}};return this.callFETool(o,a.args)}});return this.currentThread.status="interrupted",Promise.all(i)}}async callFETool(t,n){const r=this,i=await this.tools.callTool(t.name,n,{client:r,message:t});if(i)return this.resume(i)}resume(t){return this.sendMessage([],{command:{resume:t}})}doneFEToolWaiting(t,n){var i;!this.tools.doneWaiting(t,n)&&((i=this.currentThread)==null?void 0:i.status)==="interrupted"&&this.resume(n)}getCurrentThread(){return this.currentThread}getCurrentAssistant(){return this.currentAssistant}async reset(){var t;await this.initAssistant((t=this.currentAssistant)==null?void 0:t.graph_id),this.currentThread=null,this.graphState={},this.messageProcessor.setGraphMessages([]),this.messageProcessor.clearStreamingMessages(),this.currentRun=void 0,this.tools.clearWaiting(),this.emit("value",{event:"messages/partial",data:{messages:[]}})}}let Tr=[],ba=0;const dd=4;let In=e=>{let t=[],n={get(){return n.lc||n.listen(()=>{})(),n.value},lc:0,listen(r){return n.lc=t.push(r),()=>{for(let a=ba+dd;a<Tr.length;)Tr[a]===r?Tr.splice(a,dd):a+=dd;let i=t.indexOf(r);~i&&(t.splice(i,1),--n.lc)}},notify(r,i){let a=!Tr.length;for(let o of t)Tr.push(o,n.value,r,i);if(a){for(ba=0;ba<Tr.length;ba+=dd)Tr[ba](Tr[ba+1],Tr[ba+2],Tr[ba+3]);Tr.length=0}},off(){},set(r){let i=n.value;i!==r&&(n.value=r,n.notify(i))},subscribe(r){let i=n.listen(r);return r(n.value),i},value:e};return n};function GF(e,t,n){let r=new Set(t).add(void 0);return e.listen((i,a,o)=>{r.has(o)&&n(i,a,o)})}function YF(e,t,n){var r,i,a;n===void 0&&(n={});var o=(r=n.isImmediate)!=null&&r,l=(i=n.callback)!=null&&i,c=n.maxWait,f=Date.now(),d=[];function h(){if(c!==void 0){var g=Date.now()-f;if(g+t>=c)return c-g}return t}var m=function(){var g=[].slice.call(arguments),v=this;return new Promise(function(w,b){var _=o&&a===void 0;if(a!==void 0&&clearTimeout(a),a=setTimeout(function(){if(a=void 0,f=Date.now(),!o){var x=e.apply(v,g);l&&l(x),d.forEach(function(A){return(0,A.resolve)(x)}),d=[]}},h()),_){var S=e.apply(v,g);return l&&l(S),w(S)}d.push({resolve:w,reject:b})})};return m.cancel=function(g){a!==void 0&&clearTimeout(a),d.forEach(function(v){return(0,v.reject)(g)}),d=[]},m}const ZF="modulepreload",KF=function(e){return"/"+e},YT={},XF=function(t,n,r){let i=Promise.resolve();if(n&&n.length>0){let o=function(f){return Promise.all(f.map(d=>Promise.resolve(d).then(h=>({status:"fulfilled",value:h}),h=>({status:"rejected",reason:h}))))};document.getElementsByTagName("link");const l=document.querySelector("meta[property=csp-nonce]"),c=(l==null?void 0:l.nonce)||(l==null?void 0:l.getAttribute("nonce"));i=o(n.map(f=>{if(f=KF(f),f in YT)return;YT[f]=!0;const d=f.endsWith(".css"),h=d?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${f}"]${h}`))return;const m=document.createElement("link");if(m.rel=d?"stylesheet":ZF,d||(m.as="script"),m.crossOrigin="",m.href=f,c&&m.setAttribute("nonce",c),document.head.appendChild(m),d)return new Promise((g,v)=>{m.addEventListener("load",g),m.addEventListener("error",()=>v(new Error(`Unable to preload CSS for ${f}`)))})}))}function a(o){const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=o,window.dispatchEvent(l),!l.defaultPrevented)throw o}return i.then(o=>{for(const l of o||[])l.status==="rejected"&&a(l.reason);return t().catch(a)})},WF=async()=>{const{Client:e}=await XF(async()=>{const{Client:t}=await Promise.resolve().then(()=>eB);return{Client:t}},void 0);return new e},QF=e=>e.toLocaleTimeString("en-US"),JF=e=>e.toLocaleString("en"),Fh=e=>typeof e=="string"?e:Array.isArray(e)?e.map(t=>typeof t=="string"?t:t.type==="text"?t.text:t.type==="image_url"?"[图片]":JSON.stringify(t)).join(""):JSON.stringify(e),e7=e=>{var n,r,i;const t=(i=(r=(n=e==null?void 0:e.values)==null?void 0:n.messages)==null?void 0:r[0])==null?void 0:i.content;return t&&Array.isArray(t)?t.map(a=>{if(a.type==="text")return a.text}):typeof t=="string"?t:""},t7=(e,t,n={})=>{const r=In(null),i=In([]),a=In(""),o=In(!1),l=In([]),c=In(null),f=In(n.showHistory??!1),d=In(e),h=In(null),m=In("__start__"),g=In([]),v=async()=>{const P=r.get();P&&(P.tools.clearTools(),P.tools.bindTools(g.get()))},w=In(n.showGraph??!1),b=In(null),_=async()=>{var P;w.get()&&b.set(await((P=r.get())==null?void 0:P.graphVisualize())||null)},S=YF(P=>{const q=P.renderMessage,D=q[q.length-1];m.set((D==null?void 0:D.node_name)||(D==null?void 0:D.name)||"__start__"),i.set(q)},10);async function x(){var q;const P=new HF({...t,client:t.client??await WF()});return await P.initAssistant(d.get()),d.set(P.getCurrentAssistant().graph_id),c.set(null),P.on("start",()=>{o.set(!0)}),P.on("thread",()=>{var D;h.set(((D=P.getCurrentThread())==null?void 0:D.thread_id)||null),m.set("__start__"),L()}),P.on("done",()=>{o.set(!1),S(P)}),P.on("error",D=>{o.set(!1),c.set(D.data)}),P.on("message",()=>{var D;h.set(((D=P.getCurrentThread())==null?void 0:D.thread_id)||null),S(P)}),P.on("value",()=>{var D;h.set(((D=P.getCurrentThread())==null?void 0:D.thread_id)||null),S(P)}),(q=n.onInit)==null||q.call(n,P),P.graphState={},r.set(P),w.get()&&_(),v(),P}const A=async(P,q)=>{var D;!a.get().trim()&&!(P!=null&&P.length)||o.get()||!r.get()||(o.set(!0),c.set(null),await((D=r.get())==null?void 0:D.sendMessage(P||a.get(),q)),a.set(""),o.set(!1))},k=()=>{var P;(P=r.get())==null||P.cancelRun()},T=P=>{const q=l.get();l.set(q.includes(P)?q.filter(D=>D!==P):[...q,P])},O=()=>{f.set(!f.get()),f.get()&&L()},$=In([]),L=async()=>{var P;if(!(!r.get()||!f.get()))try{const q=await((P=r.get())==null?void 0:P.listThreads());$.set(q||[])}catch(q){console.error("Failed to fetch threads:",q)}};return{data:{client:r,renderMessages:i,userInput:a,loading:o,inChatError:c,currentAgent:d,collapsedTools:l,showHistory:f,historyList:$,currentChatId:h,showGraph:w,graphVisualize:b,currentNodeName:m,tools:g},mutations:{refreshTools:v,setTools(P){g.set(P),v()},isFELocking(){var P;return(P=r.get())==null?void 0:P.isFELocking(i.get())},initClient:x,sendMessage:A,stopGeneration:k,toggleToolCollapse:T,toggleHistoryVisible:O,refreshHistoryList:L,addToHistory:P=>{const q=$.get();$.set([P,...q])},setUserInput(P){a.set(P)},setCurrentAgent(P){return d.set(P),x().then(()=>{f.get()&&L()})},toggleGraphVisible(){w.set(!w.get()),w.get()&&_()},refreshGraph:_,createNewChat(){var P;(P=r.get())==null||P.reset(),c.set(null),o.set(!1)},async toHistoryChat(P){var D,H,B;c.set(null),o.set(!1);const q=await((H=r.get())==null?void 0:H.resetThread((D=P.metadata)==null?void 0:D.graph_id,P.thread_id));return q&&((B=r.get())==null||B.resetStream()),q},async deleteHistoryChat(P){var q;await((q=r.get())==null?void 0:q.deleteThread(P.thread_id)),await L()},getToolUIRender:P=>{var H;const D=(H=r.get().tools.getAllTools().find(B=>B.name===P))==null?void 0:H.render;return D?B=>D(new x7(B,r.get())):null}}}};class So extends Error{constructor(t,n){super("".concat(t," at position ").concat(n)),this.position=n}}const o3=32,n7=10,l3=9,u3=13,r7=160,i7=8192,a7=8202,s7=8239,o7=8287,l7=12288;function u7(e){return/^[0-9A-Fa-f]$/.test(e)}function rs(e){return e>="0"&&e<="9"}function c7(e){return e>=" "}function hd(e){return`,:[]/{}()
|
|
55
|
+
+`.includes(e)}function ZT(e){return e>="a"&&e<="z"||e>="A"&&e<="Z"||e==="_"||e==="$"}function KT(e){return e>="a"&&e<="z"||e>="A"&&e<="Z"||e==="_"||e==="$"||e>="0"&&e<="9"}const XT=/^(http|https|ftp|mailto|file|data|irc):\/\/$/,WT=/^[A-Za-z0-9-._~:/?#@!$&'()*+;=]$/;function QT(e){return`,[]/{}
|
|
56
|
+
+`.includes(e)}function JT(e){return xh(e)||f7.test(e)}const f7=/^[[{\w-]$/;function d7(e){return e===`
|
|
57
|
+
`||e==="\r"||e===" "||e==="\b"||e==="\f"}function cs(e,t){const n=e.charCodeAt(t);return n===o3||n===n7||n===l3||n===u3}function h7(e,t){const n=e.charCodeAt(t);return n===o3||n===l3||n===u3}function p7(e,t){const n=e.charCodeAt(t);return n===r7||n>=i7&&n<=a7||n===s7||n===o7||n===l7}function xh(e){return c3(e)||aw(e)}function c3(e){return e==='"'||e==="“"||e==="”"}function eC(e){return e==='"'}function aw(e){return e==="'"||e==="‘"||e==="’"||e==="`"||e==="´"}function tC(e){return e==="'"}function _u(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;const r=e.lastIndexOf(t);return r!==-1?e.substring(0,r)+(n?"":e.substring(r+1)):e}function Cr(e,t){let n=e.length;if(!cs(e,n-1))return e+t;for(;cs(e,n-1);)n--;return e.substring(0,n)+t+e.substring(n)}function m7(e,t,n){return e.substring(0,t)+e.substring(t+n)}function g7(e){return/[,\n][ \t\r]*$/.test(e)}const y7={"\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t"},b7={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:`
|
|
58
|
+
`,r:"\r",t:" "};function v7(e){let t=0,n="";f(),a()||q(),f();const i=d(",");for(i&&o(),JT(e[t])&&g7(n)?(i||(n=Cr(n,",")),b()):i&&(n=_u(n,","));e[t]==="}"||e[t]==="]";)t++,o();if(t>=e.length)return n;P();function a(){o();const G=v()||w()||_()||x()||A()||T(!1)||O();return o(),G}function o(){let G=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;const K=t;let Q=l(G);do Q=c(),Q&&(Q=l(G));while(Q);return t>K}function l(G){const K=G?cs:h7;let Q="";for(;;)if(K(e,t))Q+=e[t],t++;else if(p7(e,t))Q+=" ",t++;else break;return Q.length>0?(n+=Q,!0):!1}function c(){if(e[t]==="/"&&e[t+1]==="*"){for(;t<e.length&&!_7(e,t);)t++;return t+=2,!0}if(e[t]==="/"&&e[t+1]==="/"){for(;t<e.length&&e[t]!==`
|
|
59
|
+
`;)t++;return!0}return!1}function f(){if(e.slice(t,t+3)==="```"){if(t+=3,ZT(e[t]))for(;t<e.length&&KT(e[t]);)t++;return o(),!0}return!1}function d(G){return e[t]===G?(n+=e[t],t++,!0):!1}function h(G){return e[t]===G?(t++,!0):!1}function m(){return h("\\")}function g(){return o(),e[t]==="."&&e[t+1]==="."&&e[t+2]==="."?(t+=3,o(),h(","),!0):!1}function v(){if(e[t]==="{"){n+="{",t++,o(),h(",")&&o();let G=!0;for(;t<e.length&&e[t]!=="}";){let K;if(G?(K=!0,G=!1):(K=d(","),K||(n=Cr(n,",")),o()),g(),!(_()||T(!0))){e[t]==="}"||e[t]==="{"||e[t]==="]"||e[t]==="["||e[t]===void 0?n=_u(n,","):D();break}o();const R=d(":"),V=t>=e.length;R||(JT(e[t])||V?n=Cr(n,":"):H()),a()||(R||V?n+="null":H())}return e[t]==="}"?(n+="}",t++):n=Cr(n,"}"),!0}return!1}function w(){if(e[t]==="["){n+="[",t++,o(),h(",")&&o();let G=!0;for(;t<e.length&&e[t]!=="]";)if(G?G=!1:d(",")||(n=Cr(n,",")),g(),!a()){n=_u(n,",");break}return e[t]==="]"?(n+="]",t++):n=Cr(n,"]"),!0}return!1}function b(){let G=!0,K=!0;for(;K;)G?G=!1:d(",")||(n=Cr(n,",")),K=a();K||(n=_u(n,",")),n=`[
|
|
60
|
+
`.concat(n,`
|
|
61
|
+
]`)}function _(){let G=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,K=arguments.length>1&&arguments[1]!==void 0?arguments[1]:-1,Q=e[t]==="\\";if(Q&&(t++,Q=!0),xh(e[t])){const R=eC(e[t])?eC:tC(e[t])?tC:aw(e[t])?aw:c3,V=t,X=n.length;let j='"';for(t++;;){if(t>=e.length){const I=$(t-1);return!G&&hd(e.charAt(I))?(t=V,n=n.substring(0,X),_(!0)):(j=Cr(j,'"'),n+=j,!0)}else{if(t===K)return j=Cr(j,'"'),n+=j,!0;if(R(e[t])){const I=t,U=j.length;if(j+='"',t++,n+=j,o(!1),G||t>=e.length||hd(e[t])||xh(e[t])||rs(e[t]))return S(),!0;const Y=$(I-1),ne=e.charAt(Y);if(ne===",")return t=V,n=n.substring(0,X),_(!1,Y);if(hd(ne))return t=V,n=n.substring(0,X),_(!0);n=n.substring(0,X),t=I+1,j="".concat(j.substring(0,U),"\\").concat(j.substring(U))}else if(G&&QT(e[t])){if(e[t-1]===":"&&XT.test(e.substring(V+1,t+2)))for(;t<e.length&&WT.test(e[t]);)j+=e[t],t++;return j=Cr(j,'"'),n+=j,S(),!0}else if(e[t]==="\\"){const I=e.charAt(t+1);if(b7[I]!==void 0)j+=e.slice(t,t+2),t+=2;else if(I==="u"){let Y=2;for(;Y<6&&u7(e[t+Y]);)Y++;Y===6?(j+=e.slice(t,t+6),t+=6):t+Y>=e.length?t=e.length:B()}else j+=I,t+=2}else{const I=e.charAt(t);I==='"'&&e[t-1]!=="\\"?(j+="\\".concat(I),t++):d7(I)?(j+=y7[I],t++):(c7(I)||z(I),j+=I,t++)}}Q&&m()}}return!1}function S(){let G=!1;for(o();e[t]==="+";){G=!0,t++,o(),n=_u(n,'"',!0);const K=n.length;_()?n=m7(n,K,1):n=Cr(n,'"')}return G}function x(){const G=t;if(e[t]==="-"){if(t++,L())return M(G),!0;if(!rs(e[t]))return t=G,!1}for(;rs(e[t]);)t++;if(e[t]==="."){if(t++,L())return M(G),!0;if(!rs(e[t]))return t=G,!1;for(;rs(e[t]);)t++}if(e[t]==="e"||e[t]==="E"){if(t++,(e[t]==="-"||e[t]==="+")&&t++,L())return M(G),!0;if(!rs(e[t]))return t=G,!1;for(;rs(e[t]);)t++}if(!L())return t=G,!1;if(t>G){const K=e.slice(G,t),Q=/^0\d/.test(K);return n+=Q?'"'.concat(K,'"'):K,!0}return!1}function A(){return k("true","true")||k("false","false")||k("null","null")||k("True","true")||k("False","false")||k("None","null")}function k(G,K){return e.slice(t,t+G.length)===G?(n+=K,t+=G.length,!0):!1}function T(G){const K=t;if(ZT(e[t])){for(;t<e.length&&KT(e[t]);)t++;let Q=t;for(;cs(e,Q);)Q++;if(e[Q]==="(")return t=Q+1,a(),e[t]===")"&&(t++,e[t]===";"&&t++),!0}for(;t<e.length&&!QT(e[t])&&!xh(e[t])&&(!G||e[t]!==":");)t++;if(e[t-1]===":"&&XT.test(e.substring(K,t+2)))for(;t<e.length&&WT.test(e[t]);)t++;if(t>K){for(;cs(e,t-1)&&t>0;)t--;const Q=e.slice(K,t);return n+=Q==="undefined"?"null":JSON.stringify(Q),e[t]==='"'&&t++,!0}}function O(){if(e[t]==="/"){const G=t;for(t++;t<e.length&&(e[t]!=="/"||e[t-1]==="\\");)t++;return t++,n+='"'.concat(e.substring(G,t),'"'),!0}}function $(G){let K=G;for(;K>0&&cs(e,K);)K--;return K}function L(){return t>=e.length||hd(e[t])||cs(e,t)}function M(G){n+="".concat(e.slice(G,t),"0")}function z(G){throw new So("Invalid character ".concat(JSON.stringify(G)),t)}function P(){throw new So("Unexpected character ".concat(JSON.stringify(e[t])),t)}function q(){throw new So("Unexpected end of json string",e.length)}function D(){throw new So("Object key expected",t)}function H(){throw new So("Colon expected",t)}function B(){const G=e.slice(t,t+6);throw new So('Invalid unicode character "'.concat(G,'"'),t)}}function _7(e,t){return e[t]==="*"&&e[t+1]==="/"}class x7{constructor(t,n){this.message=t,this.client=n}get state(){var t,n;return this.message.type==="tool"&&((n=(t=this.message)==null?void 0:t.additional_kwargs)!=null&&n.done)?"done":this.message.tool_input?"loading":"idle"}get input(){try{return JSON.parse(this.message.tool_input)}catch{return null}}get output(){return Fh(this.message.content)}getJSONOutput(){return JSON.parse(this.output)}getJSONOutputSafe(){try{return JSON.parse(this.output)}catch{return null}}getInputRepaired(){try{return JSON.parse(v7(this.message.tool_input||""))}catch{return{}}}response(t){this.client.doneFEToolWaiting(this.message.id,JSON.stringify(t))}}var xu={exports:{}},zy={},qy,nC;function w7(){if(nC)return qy;nC=1;function e(t,n){typeof n=="boolean"&&(n={forever:n}),this._originalTimeouts=JSON.parse(JSON.stringify(t)),this._timeouts=t,this._options=n||{},this._maxRetryTime=n&&n.maxRetryTime||1/0,this._fn=null,this._errors=[],this._attempts=1,this._operationTimeout=null,this._operationTimeoutCb=null,this._timeout=null,this._operationStart=null,this._timer=null,this._options.forever&&(this._cachedTimeouts=this._timeouts.slice(0))}return qy=e,e.prototype.reset=function(){this._attempts=1,this._timeouts=this._originalTimeouts.slice(0)},e.prototype.stop=function(){this._timeout&&clearTimeout(this._timeout),this._timer&&clearTimeout(this._timer),this._timeouts=[],this._cachedTimeouts=null},e.prototype.retry=function(t){if(this._timeout&&clearTimeout(this._timeout),!t)return!1;var n=new Date().getTime();if(t&&n-this._operationStart>=this._maxRetryTime)return this._errors.push(t),this._errors.unshift(new Error("RetryOperation timeout occurred")),!1;this._errors.push(t);var r=this._timeouts.shift();if(r===void 0)if(this._cachedTimeouts)this._errors.splice(0,this._errors.length-1),r=this._cachedTimeouts.slice(-1);else return!1;var i=this;return this._timer=setTimeout(function(){i._attempts++,i._operationTimeoutCb&&(i._timeout=setTimeout(function(){i._operationTimeoutCb(i._attempts)},i._operationTimeout),i._options.unref&&i._timeout.unref()),i._fn(i._attempts)},r),this._options.unref&&this._timer.unref(),!0},e.prototype.attempt=function(t,n){this._fn=t,n&&(n.timeout&&(this._operationTimeout=n.timeout),n.cb&&(this._operationTimeoutCb=n.cb));var r=this;this._operationTimeoutCb&&(this._timeout=setTimeout(function(){r._operationTimeoutCb()},r._operationTimeout)),this._operationStart=new Date().getTime(),this._fn(this._attempts)},e.prototype.try=function(t){console.log("Using RetryOperation.try() is deprecated"),this.attempt(t)},e.prototype.start=function(t){console.log("Using RetryOperation.start() is deprecated"),this.attempt(t)},e.prototype.start=e.prototype.try,e.prototype.errors=function(){return this._errors},e.prototype.attempts=function(){return this._attempts},e.prototype.mainError=function(){if(this._errors.length===0)return null;for(var t={},n=null,r=0,i=0;i<this._errors.length;i++){var a=this._errors[i],o=a.message,l=(t[o]||0)+1;t[o]=l,l>=r&&(n=a,r=l)}return n},qy}var rC;function S7(){return rC||(rC=1,function(e){var t=w7();e.operation=function(n){var r=e.timeouts(n);return new t(r,{forever:n&&(n.forever||n.retries===1/0),unref:n&&n.unref,maxRetryTime:n&&n.maxRetryTime})},e.timeouts=function(n){if(n instanceof Array)return[].concat(n);var r={retries:10,factor:2,minTimeout:1*1e3,maxTimeout:1/0,randomize:!1};for(var i in n)r[i]=n[i];if(r.minTimeout>r.maxTimeout)throw new Error("minTimeout is greater than maxTimeout");for(var a=[],o=0;o<r.retries;o++)a.push(this.createTimeout(o,r));return n&&n.forever&&!a.length&&a.push(this.createTimeout(o,r)),a.sort(function(l,c){return l-c}),a},e.createTimeout=function(n,r){var i=r.randomize?Math.random()+1:1,a=Math.round(i*Math.max(r.minTimeout,1)*Math.pow(r.factor,n));return a=Math.min(a,r.maxTimeout),a},e.wrap=function(n,r,i){if(r instanceof Array&&(i=r,r=null),!i){i=[];for(var a in n)typeof n[a]=="function"&&i.push(a)}for(var o=0;o<i.length;o++){var l=i[o],c=n[l];n[l]=(function(d){var h=e.operation(r),m=Array.prototype.slice.call(arguments,1),g=m.pop();m.push(function(v){h.retry(v)||(v&&(arguments[0]=h.mainError()),g.apply(this,arguments))}),h.attempt(function(){d.apply(n,m)})}).bind(n,c),n[l].options=r}}}(zy)),zy}var Fy,iC;function E7(){return iC||(iC=1,Fy=S7()),Fy}var aC;function k7(){if(aC)return xu.exports;aC=1;const e=E7(),t=["Failed to fetch","NetworkError when attempting to fetch resource.","The Internet connection appears to be offline.","Network request failed"];class n extends Error{constructor(l){super(),l instanceof Error?(this.originalError=l,{message:l}=l):(this.originalError=new Error(l),this.originalError.stack=this.stack),this.name="AbortError",this.message=l}}const r=(o,l,c)=>{const f=c.retries-(l-1);return o.attemptNumber=l,o.retriesLeft=f,o},i=o=>t.includes(o),a=(o,l)=>new Promise((c,f)=>{l={onFailedAttempt:()=>{},retries:10,...l};const d=e.operation(l);d.attempt(async h=>{try{c(await o(h))}catch(m){if(!(m instanceof Error)){f(new TypeError(`Non-error was thrown: "${m}". You should only throw errors.`));return}if(m instanceof n)d.stop(),f(m.originalError);else if(m instanceof TypeError&&!i(m.message))d.stop(),f(m);else{r(m,h,l);try{await l.onFailedAttempt(m)}catch(g){f(g);return}d.retry(m)||f(d.mainError())}}})});return xu.exports=a,xu.exports.default=a,xu.exports.AbortError=n,xu.exports}var A7=k7();const T7=zn(A7);var pd={},By={exports:{}},sC;function C7(){return sC||(sC=1,function(e){var t=Object.prototype.hasOwnProperty,n="~";function r(){}Object.create&&(r.prototype=Object.create(null),new r().__proto__||(n=!1));function i(c,f,d){this.fn=c,this.context=f,this.once=d||!1}function a(c,f,d,h,m){if(typeof d!="function")throw new TypeError("The listener must be a function");var g=new i(d,h||c,m),v=n?n+f:f;return c._events[v]?c._events[v].fn?c._events[v]=[c._events[v],g]:c._events[v].push(g):(c._events[v]=g,c._eventsCount++),c}function o(c,f){--c._eventsCount===0?c._events=new r:delete c._events[f]}function l(){this._events=new r,this._eventsCount=0}l.prototype.eventNames=function(){var f=[],d,h;if(this._eventsCount===0)return f;for(h in d=this._events)t.call(d,h)&&f.push(n?h.slice(1):h);return Object.getOwnPropertySymbols?f.concat(Object.getOwnPropertySymbols(d)):f},l.prototype.listeners=function(f){var d=n?n+f:f,h=this._events[d];if(!h)return[];if(h.fn)return[h.fn];for(var m=0,g=h.length,v=new Array(g);m<g;m++)v[m]=h[m].fn;return v},l.prototype.listenerCount=function(f){var d=n?n+f:f,h=this._events[d];return h?h.fn?1:h.length:0},l.prototype.emit=function(f,d,h,m,g,v){var w=n?n+f:f;if(!this._events[w])return!1;var b=this._events[w],_=arguments.length,S,x;if(b.fn){switch(b.once&&this.removeListener(f,b.fn,void 0,!0),_){case 1:return b.fn.call(b.context),!0;case 2:return b.fn.call(b.context,d),!0;case 3:return b.fn.call(b.context,d,h),!0;case 4:return b.fn.call(b.context,d,h,m),!0;case 5:return b.fn.call(b.context,d,h,m,g),!0;case 6:return b.fn.call(b.context,d,h,m,g,v),!0}for(x=1,S=new Array(_-1);x<_;x++)S[x-1]=arguments[x];b.fn.apply(b.context,S)}else{var A=b.length,k;for(x=0;x<A;x++)switch(b[x].once&&this.removeListener(f,b[x].fn,void 0,!0),_){case 1:b[x].fn.call(b[x].context);break;case 2:b[x].fn.call(b[x].context,d);break;case 3:b[x].fn.call(b[x].context,d,h);break;case 4:b[x].fn.call(b[x].context,d,h,m);break;default:if(!S)for(k=1,S=new Array(_-1);k<_;k++)S[k-1]=arguments[k];b[x].fn.apply(b[x].context,S)}}return!0},l.prototype.on=function(f,d,h){return a(this,f,d,h,!1)},l.prototype.once=function(f,d,h){return a(this,f,d,h,!0)},l.prototype.removeListener=function(f,d,h,m){var g=n?n+f:f;if(!this._events[g])return this;if(!d)return o(this,g),this;var v=this._events[g];if(v.fn)v.fn===d&&(!m||v.once)&&(!h||v.context===h)&&o(this,g);else{for(var w=0,b=[],_=v.length;w<_;w++)(v[w].fn!==d||m&&!v[w].once||h&&v[w].context!==h)&&b.push(v[w]);b.length?this._events[g]=b.length===1?b[0]:b:o(this,g)}return this},l.prototype.removeAllListeners=function(f){var d;return f?(d=n?n+f:f,this._events[d]&&o(this,d)):(this._events=new r,this._eventsCount=0),this},l.prototype.off=l.prototype.removeListener,l.prototype.addListener=l.prototype.on,l.prefixed=n,l.EventEmitter=l,e.exports=l}(By)),By.exports}var wu={exports:{}},Uy,oC;function O7(){return oC||(oC=1,Uy=(e,t)=>(t=t||(()=>{}),e.then(n=>new Promise(r=>{r(t())}).then(()=>n),n=>new Promise(r=>{r(t())}).then(()=>{throw n})))),Uy}var lC;function N7(){if(lC)return wu.exports;lC=1;const e=O7();class t extends Error{constructor(i){super(i),this.name="TimeoutError"}}const n=(r,i,a)=>new Promise((o,l)=>{if(typeof i!="number"||i<0)throw new TypeError("Expected `milliseconds` to be a positive number");if(i===1/0){o(r);return}const c=setTimeout(()=>{if(typeof a=="function"){try{o(a())}catch(h){l(h)}return}const f=typeof a=="string"?a:`Promise timed out after ${i} milliseconds`,d=a instanceof Error?a:new t(f);typeof r.cancel=="function"&&r.cancel(),l(d)},i);e(r.then(o,l),()=>{clearTimeout(c)})});return wu.exports=n,wu.exports.default=n,wu.exports.TimeoutError=t,wu.exports}var md={},gd={},uC;function R7(){if(uC)return gd;uC=1,Object.defineProperty(gd,"__esModule",{value:!0});function e(t,n,r){let i=0,a=t.length;for(;a>0;){const o=a/2|0;let l=i+o;r(t[l],n)<=0?(i=++l,a-=o+1):a=o}return i}return gd.default=e,gd}var cC;function j7(){if(cC)return md;cC=1,Object.defineProperty(md,"__esModule",{value:!0});const e=R7();class t{constructor(){this._queue=[]}enqueue(r,i){i=Object.assign({priority:0},i);const a={priority:i.priority,run:r};if(this.size&&this._queue[this.size-1].priority>=i.priority){this._queue.push(a);return}const o=e.default(this._queue,a,(l,c)=>c.priority-l.priority);this._queue.splice(o,0,a)}dequeue(){const r=this._queue.shift();return r==null?void 0:r.run}filter(r){return this._queue.filter(i=>i.priority===r.priority).map(i=>i.run)}get size(){return this._queue.length}}return md.default=t,md}var fC;function M7(){if(fC)return pd;fC=1,Object.defineProperty(pd,"__esModule",{value:!0});const e=C7(),t=N7(),n=j7(),r=()=>{},i=new t.TimeoutError;class a extends e{constructor(l){var c,f,d,h;if(super(),this._intervalCount=0,this._intervalEnd=0,this._pendingCount=0,this._resolveEmpty=r,this._resolveIdle=r,l=Object.assign({carryoverConcurrencyCount:!1,intervalCap:1/0,interval:0,concurrency:1/0,autoStart:!0,queueClass:n.default},l),!(typeof l.intervalCap=="number"&&l.intervalCap>=1))throw new TypeError(`Expected \`intervalCap\` to be a number from 1 and up, got \`${(f=(c=l.intervalCap)===null||c===void 0?void 0:c.toString())!==null&&f!==void 0?f:""}\` (${typeof l.intervalCap})`);if(l.interval===void 0||!(Number.isFinite(l.interval)&&l.interval>=0))throw new TypeError(`Expected \`interval\` to be a finite number >= 0, got \`${(h=(d=l.interval)===null||d===void 0?void 0:d.toString())!==null&&h!==void 0?h:""}\` (${typeof l.interval})`);this._carryoverConcurrencyCount=l.carryoverConcurrencyCount,this._isIntervalIgnored=l.intervalCap===1/0||l.interval===0,this._intervalCap=l.intervalCap,this._interval=l.interval,this._queue=new l.queueClass,this._queueClass=l.queueClass,this.concurrency=l.concurrency,this._timeout=l.timeout,this._throwOnTimeout=l.throwOnTimeout===!0,this._isPaused=l.autoStart===!1}get _doesIntervalAllowAnother(){return this._isIntervalIgnored||this._intervalCount<this._intervalCap}get _doesConcurrentAllowAnother(){return this._pendingCount<this._concurrency}_next(){this._pendingCount--,this._tryToStartAnother(),this.emit("next")}_resolvePromises(){this._resolveEmpty(),this._resolveEmpty=r,this._pendingCount===0&&(this._resolveIdle(),this._resolveIdle=r,this.emit("idle"))}_onResumeInterval(){this._onInterval(),this._initializeIntervalIfNeeded(),this._timeoutId=void 0}_isIntervalPaused(){const l=Date.now();if(this._intervalId===void 0){const c=this._intervalEnd-l;if(c<0)this._intervalCount=this._carryoverConcurrencyCount?this._pendingCount:0;else return this._timeoutId===void 0&&(this._timeoutId=setTimeout(()=>{this._onResumeInterval()},c)),!0}return!1}_tryToStartAnother(){if(this._queue.size===0)return this._intervalId&&clearInterval(this._intervalId),this._intervalId=void 0,this._resolvePromises(),!1;if(!this._isPaused){const l=!this._isIntervalPaused();if(this._doesIntervalAllowAnother&&this._doesConcurrentAllowAnother){const c=this._queue.dequeue();return c?(this.emit("active"),c(),l&&this._initializeIntervalIfNeeded(),!0):!1}}return!1}_initializeIntervalIfNeeded(){this._isIntervalIgnored||this._intervalId!==void 0||(this._intervalId=setInterval(()=>{this._onInterval()},this._interval),this._intervalEnd=Date.now()+this._interval)}_onInterval(){this._intervalCount===0&&this._pendingCount===0&&this._intervalId&&(clearInterval(this._intervalId),this._intervalId=void 0),this._intervalCount=this._carryoverConcurrencyCount?this._pendingCount:0,this._processQueue()}_processQueue(){for(;this._tryToStartAnother(););}get concurrency(){return this._concurrency}set concurrency(l){if(!(typeof l=="number"&&l>=1))throw new TypeError(`Expected \`concurrency\` to be a number from 1 and up, got \`${l}\` (${typeof l})`);this._concurrency=l,this._processQueue()}async add(l,c={}){return new Promise((f,d)=>{const h=async()=>{this._pendingCount++,this._intervalCount++;try{const m=this._timeout===void 0&&c.timeout===void 0?l():t.default(Promise.resolve(l()),c.timeout===void 0?this._timeout:c.timeout,()=>{(c.throwOnTimeout===void 0?this._throwOnTimeout:c.throwOnTimeout)&&d(i)});f(await m)}catch(m){d(m)}this._next()};this._queue.enqueue(h,c),this._tryToStartAnother(),this.emit("add")})}async addAll(l,c){return Promise.all(l.map(async f=>this.add(f,c)))}start(){return this._isPaused?(this._isPaused=!1,this._processQueue(),this):this}pause(){this._isPaused=!0}clear(){this._queue=new this._queueClass}async onEmpty(){if(this._queue.size!==0)return new Promise(l=>{const c=this._resolveEmpty;this._resolveEmpty=()=>{c(),l()}})}async onIdle(){if(!(this._pendingCount===0&&this._queue.size===0))return new Promise(l=>{const c=this._resolveIdle;this._resolveIdle=()=>{c(),l()}})}get size(){return this._queue.size}sizeBy(l){return this._queue.filter(l).length}get pending(){return this._pendingCount}get isPaused(){return this._isPaused}get timeout(){return this._timeout}set timeout(l){this._timeout=l}}return pd.default=a,pd}var $7=M7();const Vy=zn($7),D7=(...e)=>fetch(...e),I7=Symbol.for("lg:fetch_implementation"),P7=()=>globalThis[I7]??D7,L7=[400,401,402,403,404,405,406,407,408,409,422];function z7(e){return e==null||typeof e!="object"?!1:"status"in e&&"statusText"in e&&"text"in e}class tc extends Error{constructor(t,n,r){super(`HTTP ${t}: ${n}`),Object.defineProperty(this,"status",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"text",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"response",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.status=t,this.text=n,this.response=r}static async fromResponse(t,n){try{return new tc(t.status,await t.text(),n!=null&&n.includeResponse?t:void 0)}catch{return new tc(t.status,t.statusText,n!=null&&n.includeResponse?t:void 0)}}}class q7{constructor(t){Object.defineProperty(this,"maxConcurrency",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"maxRetries",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"queue",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"onFailedResponseHook",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"customFetch",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.maxConcurrency=t.maxConcurrency??1/0,this.maxRetries=t.maxRetries??4,"default"in Vy?this.queue=new Vy.default({concurrency:this.maxConcurrency}):this.queue=new Vy({concurrency:this.maxConcurrency}),this.onFailedResponseHook=t==null?void 0:t.onFailedResponseHook,this.customFetch=t.fetch}call(t,...n){const r=this.onFailedResponseHook;return this.queue.add(()=>T7(()=>t(...n).catch(async i=>{throw i instanceof Error?i:z7(i)?await tc.fromResponse(i,{includeResponse:!!r}):new Error(i)}),{async onFailedAttempt(i){if(i.message.startsWith("Cancel")||i.message.startsWith("TimeoutError")||i.message.startsWith("AbortError")||(i==null?void 0:i.code)==="ECONNABORTED")throw i;if(i instanceof tc){if(L7.includes(i.status))throw i;r&&i.response&&await r(i.response)}},retries:this.maxRetries,randomize:!0}),{throwOnTimeout:!0})}callWithOptions(t,n,...r){return t.signal?Promise.race([this.call(n,...r),new Promise((i,a)=>{var o;(o=t.signal)==null||o.addEventListener("abort",()=>{a(new Error("AbortError"))})})]):this.call(n,...r)}fetch(...t){const n=this.customFetch??P7();return this.call(()=>n(...t).then(r=>r.ok?r:Promise.reject(r)))}}var Hy={};function F7(e){try{return typeof process<"u"?Hy==null?void 0:Hy[e]:void 0}catch{return}}function B7(...e){const t=e.filter(r=>r!=null);if(t.length===0)return;if(t.length===1)return t[0];const n=new AbortController;for(const r of e){if(r!=null&&r.aborted)return n.abort(r.reason),n.signal;r==null||r.addEventListener("abort",()=>n.abort(r.reason),{once:!0})}return n.signal}const Pu=13,sw=10,U7=0,dC=58,V7=32,H7=[Pu,sw];class hC extends TransformStream{constructor(){let t=[],n=!1;super({start(){t=[],n=!1},transform(r,i){let a=r;if(n&&(a=wh([[Pu],a]),n=!1),a.length>0&&a.at(-1)===Pu&&(n=!0,a=a.subarray(0,-1)),!a.length)return;const o=H7.includes(a.at(-1)),l=a.length-1,{lines:c}=a.reduce((f,d,h)=>(f.from>h||((d===Pu||d===sw)&&(f.lines.push(a.subarray(f.from,h)),d===Pu&&a[h+1]===sw?f.from=h+2:f.from=h+1),h===l&&f.from<=l&&f.lines.push(a.subarray(f.from))),f),{lines:[],from:0});if(c.length===1&&!o){t.push(c[0]);return}t.length&&(t.push(c[0]),c[0]=wh(t),t=[]),o||c.length&&(t=[c.pop()]);for(const f of c)i.enqueue(f)},flush(r){t.length&&r.enqueue(wh(t))}})}}class pC extends TransformStream{constructor(){let t="",n=[],r="",i=null;const a=new TextDecoder;super({transform(o,l){if(!o.length){if(!t&&!n.length&&!r&&i==null)return;const h={id:r||void 0,event:t,data:n.length?mC(a,n):null};t="",n=[],i=null,l.enqueue(h);return}if(o[0]===dC)return;const c=o.indexOf(dC);if(c===-1)return;const f=a.decode(o.subarray(0,c));let d=o.subarray(c+1);if(d[0]===V7&&(d=d.subarray(1)),f==="event")t=a.decode(d);else if(f==="data")n.push(d);else if(f==="id")d.indexOf(U7)===-1&&(r=a.decode(d));else if(f==="retry"){const h=Number.parseInt(a.decode(d));Number.isNaN(h)||(i=h)}},flush(o){t&&o.enqueue({id:r||void 0,event:t,data:n.length?mC(a,n):null})}})}}function wh(e){const t=e.reduce((i,a)=>i+a.length,0);let n=new Uint8Array(t),r=0;for(const i of e)n.set(i,r),r+=i.length;return n}function mC(e,t){return JSON.parse(e.decode(wh(t)))}class nc extends ReadableStream{constructor(){super(...arguments),Object.defineProperty(this,"reader",{enumerable:!0,configurable:!0,writable:!0,value:void 0})}ensureReader(){this.reader||(this.reader=this.getReader())}async next(){this.ensureReader();try{const t=await this.reader.read();return t.done?(this.reader.releaseLock(),{done:!0,value:void 0}):{done:!1,value:t.value}}catch(t){throw this.reader.releaseLock(),t}}async return(){if(this.ensureReader(),this.locked){const t=this.reader.cancel();this.reader.releaseLock(),await t}return{done:!0,value:void 0}}async throw(t){if(this.ensureReader(),this.locked){const n=this.reader.cancel();this.reader.releaseLock(),await n}throw t}async[Symbol.asyncDispose](){await this.return()}[Symbol.asyncIterator](){return this}static fromReadableStream(t){const n=t.getReader();return new nc({start(r){return i();function i(){return n.read().then(({done:a,value:o})=>{if(a){r.close();return}return r.enqueue(o),i()})}},cancel(){n.releaseLock()}})}static fromAsyncGenerator(t){return new nc({async pull(n){const{value:r,done:i}=await t.next();i&&n.close(),n.enqueue(r)},async cancel(n){await t.return(n)}})}}function G7(e){if(e)return e;const t=["LANGGRAPH","LANGSMITH","LANGCHAIN"];for(const n of t){const r=F7(`${n}_API_KEY`);if(r)return r.trim().replace(/^["']|["']$/g,"")}}const Y7=/(\/threads\/(?<thread_id>.+))?\/runs\/(?<run_id>.+)/;function Gy(e){var r;const t=e.headers.get("Content-Location");if(!t)return;const n=Y7.exec(t);if((r=n==null?void 0:n.groups)!=null&&r.run_id)return{run_id:n.groups.run_id,thread_id:n.groups.thread_id||void 0}}class al{constructor(t){var a;Object.defineProperty(this,"asyncCaller",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"timeoutMs",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"apiUrl",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"defaultHeaders",{enumerable:!0,configurable:!0,writable:!0,value:void 0});const n={maxRetries:4,maxConcurrency:4,...t==null?void 0:t.callerOptions};let r="http://localhost:8123";if(!(t!=null&&t.apiUrl)&&typeof globalThis=="object"&&globalThis!=null){const o=Symbol.for("langgraph_api:fetch"),l=Symbol.for("langgraph_api:url"),c=globalThis;c[o]&&(n.fetch??(n.fetch=c[o])),c[l]&&(r=c[l])}this.asyncCaller=new q7(n),this.timeoutMs=t==null?void 0:t.timeoutMs,this.apiUrl=((a=t==null?void 0:t.apiUrl)==null?void 0:a.replace(/\/$/,""))||r,this.defaultHeaders=(t==null?void 0:t.defaultHeaders)||{};const i=G7(t==null?void 0:t.apiKey);i&&(this.defaultHeaders["X-Api-Key"]=i)}prepareFetchOptions(t,n){const r={...n,headers:{...this.defaultHeaders,...n==null?void 0:n.headers}};r.json&&(r.body=JSON.stringify(r.json),r.headers={...r.headers,"Content-Type":"application/json"},delete r.json),r.withResponse&&delete r.withResponse;let i=null;typeof(n==null?void 0:n.timeoutMs)<"u"?n.timeoutMs!=null&&(i=AbortSignal.timeout(n.timeoutMs)):this.timeoutMs!=null&&(i=AbortSignal.timeout(this.timeoutMs)),r.signal=B7(i,r.signal);const a=new URL(`${this.apiUrl}${t}`);if(r.params){for(const[o,l]of Object.entries(r.params)){if(l==null)continue;let c=typeof l=="string"||typeof l=="number"?l.toString():JSON.stringify(l);a.searchParams.append(o,c)}delete r.params}return[a,r]}async fetch(t,n){const r=await this.asyncCaller.fetch(...this.prepareFetchOptions(t,n)),i=(()=>{if(!(r.status===202||r.status===204))return r.json()})();return n!=null&&n.withResponse?[await i,r]:i}}class Z7 extends al{async createForThread(t,n,r){const i={schedule:r==null?void 0:r.schedule,input:r==null?void 0:r.input,config:r==null?void 0:r.config,metadata:r==null?void 0:r.metadata,assistant_id:n,interrupt_before:r==null?void 0:r.interruptBefore,interrupt_after:r==null?void 0:r.interruptAfter,webhook:r==null?void 0:r.webhook,multitask_strategy:r==null?void 0:r.multitaskStrategy,if_not_exists:r==null?void 0:r.ifNotExists,checkpoint_during:r==null?void 0:r.checkpointDuring};return this.fetch(`/threads/${t}/runs/crons`,{method:"POST",json:i})}async create(t,n){const r={schedule:n==null?void 0:n.schedule,input:n==null?void 0:n.input,config:n==null?void 0:n.config,metadata:n==null?void 0:n.metadata,assistant_id:t,interrupt_before:n==null?void 0:n.interruptBefore,interrupt_after:n==null?void 0:n.interruptAfter,webhook:n==null?void 0:n.webhook,multitask_strategy:n==null?void 0:n.multitaskStrategy,if_not_exists:n==null?void 0:n.ifNotExists,checkpoint_during:n==null?void 0:n.checkpointDuring};return this.fetch("/runs/crons",{method:"POST",json:r})}async delete(t){await this.fetch(`/runs/crons/${t}`,{method:"DELETE"})}async search(t){return this.fetch("/runs/crons/search",{method:"POST",json:{assistant_id:(t==null?void 0:t.assistantId)??void 0,thread_id:(t==null?void 0:t.threadId)??void 0,limit:(t==null?void 0:t.limit)??10,offset:(t==null?void 0:t.offset)??0}})}}class K7 extends al{async get(t){return this.fetch(`/assistants/${t}`)}async getGraph(t,n){return this.fetch(`/assistants/${t}/graph`,{params:{xray:n==null?void 0:n.xray}})}async getSchemas(t){return this.fetch(`/assistants/${t}/schemas`)}async getSubgraphs(t,n){return n!=null&&n.namespace?this.fetch(`/assistants/${t}/subgraphs/${n.namespace}`,{params:{recurse:n==null?void 0:n.recurse}}):this.fetch(`/assistants/${t}/subgraphs`,{params:{recurse:n==null?void 0:n.recurse}})}async create(t){return this.fetch("/assistants",{method:"POST",json:{graph_id:t.graphId,config:t.config,metadata:t.metadata,assistant_id:t.assistantId,if_exists:t.ifExists,name:t.name,description:t.description}})}async update(t,n){return this.fetch(`/assistants/${t}`,{method:"PATCH",json:{graph_id:n.graphId,config:n.config,metadata:n.metadata,name:n.name,description:n.description}})}async delete(t){return this.fetch(`/assistants/${t}`,{method:"DELETE"})}async search(t){return this.fetch("/assistants/search",{method:"POST",json:{graph_id:(t==null?void 0:t.graphId)??void 0,metadata:(t==null?void 0:t.metadata)??void 0,limit:(t==null?void 0:t.limit)??10,offset:(t==null?void 0:t.offset)??0,sort_by:(t==null?void 0:t.sortBy)??void 0,sort_order:(t==null?void 0:t.sortOrder)??void 0}})}async getVersions(t,n){return this.fetch(`/assistants/${t}/versions`,{method:"POST",json:{metadata:(n==null?void 0:n.metadata)??void 0,limit:(n==null?void 0:n.limit)??10,offset:(n==null?void 0:n.offset)??0}})}async setLatest(t,n){return this.fetch(`/assistants/${t}/latest`,{method:"POST",json:{version:n}})}}class X7 extends al{async get(t){return this.fetch(`/threads/${t}`)}async create(t){var n;return this.fetch("/threads",{method:"POST",json:{metadata:{...t==null?void 0:t.metadata,graph_id:t==null?void 0:t.graphId},thread_id:t==null?void 0:t.threadId,if_exists:t==null?void 0:t.ifExists,supersteps:(n=t==null?void 0:t.supersteps)==null?void 0:n.map(r=>({updates:r.updates.map(i=>({values:i.values,command:i.command,as_node:i.asNode}))}))}})}async copy(t){return this.fetch(`/threads/${t}/copy`,{method:"POST"})}async update(t,n){return this.fetch(`/threads/${t}`,{method:"PATCH",json:{metadata:n==null?void 0:n.metadata}})}async delete(t){return this.fetch(`/threads/${t}`,{method:"DELETE"})}async search(t){return this.fetch("/threads/search",{method:"POST",json:{metadata:(t==null?void 0:t.metadata)??void 0,limit:(t==null?void 0:t.limit)??10,offset:(t==null?void 0:t.offset)??0,status:t==null?void 0:t.status,sort_by:t==null?void 0:t.sortBy,sort_order:t==null?void 0:t.sortOrder}})}async getState(t,n,r){return n!=null?typeof n!="string"?this.fetch(`/threads/${t}/state/checkpoint`,{method:"POST",json:{checkpoint:n,subgraphs:r==null?void 0:r.subgraphs}}):this.fetch(`/threads/${t}/state/${n}`,{params:{subgraphs:r==null?void 0:r.subgraphs}}):this.fetch(`/threads/${t}/state`,{params:{subgraphs:r==null?void 0:r.subgraphs}})}async updateState(t,n){return this.fetch(`/threads/${t}/state`,{method:"POST",json:{values:n.values,checkpoint_id:n.checkpointId,checkpoint:n.checkpoint,as_node:n==null?void 0:n.asNode}})}async patchState(t,n){var i;let r;if(typeof t!="string"){if(typeof((i=t.configurable)==null?void 0:i.thread_id)!="string")throw new Error("Thread ID is required when updating state with a config.");r=t.configurable.thread_id}else r=t;return this.fetch(`/threads/${r}/state`,{method:"PATCH",json:{metadata:n}})}async getHistory(t,n){return this.fetch(`/threads/${t}/history`,{method:"POST",json:{limit:(n==null?void 0:n.limit)??10,before:n==null?void 0:n.before,metadata:n==null?void 0:n.metadata,checkpoint:n==null?void 0:n.checkpoint}})}}class W7 extends al{async*stream(t,n,r){var f;const i={input:r==null?void 0:r.input,command:r==null?void 0:r.command,config:r==null?void 0:r.config,metadata:r==null?void 0:r.metadata,stream_mode:r==null?void 0:r.streamMode,stream_subgraphs:r==null?void 0:r.streamSubgraphs,stream_resumable:r==null?void 0:r.streamResumable,feedback_keys:r==null?void 0:r.feedbackKeys,assistant_id:n,interrupt_before:r==null?void 0:r.interruptBefore,interrupt_after:r==null?void 0:r.interruptAfter,checkpoint:r==null?void 0:r.checkpoint,checkpoint_id:r==null?void 0:r.checkpointId,webhook:r==null?void 0:r.webhook,multitask_strategy:r==null?void 0:r.multitaskStrategy,on_completion:r==null?void 0:r.onCompletion,on_disconnect:r==null?void 0:r.onDisconnect,after_seconds:r==null?void 0:r.afterSeconds,if_not_exists:r==null?void 0:r.ifNotExists,checkpoint_during:r==null?void 0:r.checkpointDuring},a=t==null?"/runs/stream":`/threads/${t}/runs/stream`,o=await this.asyncCaller.fetch(...this.prepareFetchOptions(a,{method:"POST",json:i,timeoutMs:null,signal:r==null?void 0:r.signal})),l=Gy(o);l&&((f=r==null?void 0:r.onRunCreated)==null||f.call(r,l));const c=(o.body||new ReadableStream({start:d=>d.close()})).pipeThrough(new hC).pipeThrough(new pC);yield*nc.fromReadableStream(c)}async create(t,n,r){var c;const i={input:r==null?void 0:r.input,command:r==null?void 0:r.command,config:r==null?void 0:r.config,metadata:r==null?void 0:r.metadata,stream_mode:r==null?void 0:r.streamMode,stream_subgraphs:r==null?void 0:r.streamSubgraphs,stream_resumable:r==null?void 0:r.streamResumable,assistant_id:n,interrupt_before:r==null?void 0:r.interruptBefore,interrupt_after:r==null?void 0:r.interruptAfter,webhook:r==null?void 0:r.webhook,checkpoint:r==null?void 0:r.checkpoint,checkpoint_id:r==null?void 0:r.checkpointId,multitask_strategy:r==null?void 0:r.multitaskStrategy,after_seconds:r==null?void 0:r.afterSeconds,if_not_exists:r==null?void 0:r.ifNotExists,checkpoint_during:r==null?void 0:r.checkpointDuring},[a,o]=await this.fetch(`/threads/${t}/runs`,{method:"POST",json:i,signal:r==null?void 0:r.signal,withResponse:!0}),l=Gy(o);return l&&((c=r==null?void 0:r.onRunCreated)==null||c.call(r,l)),a}async createBatch(t){const n=t.map(r=>({...r,assistant_id:r.assistantId})).map(r=>Object.fromEntries(Object.entries(r).filter(([i,a])=>a!==void 0)));return this.fetch("/runs/batch",{method:"POST",json:n})}async wait(t,n,r){var d,h,m;const i={input:r==null?void 0:r.input,command:r==null?void 0:r.command,config:r==null?void 0:r.config,metadata:r==null?void 0:r.metadata,assistant_id:n,interrupt_before:r==null?void 0:r.interruptBefore,interrupt_after:r==null?void 0:r.interruptAfter,checkpoint:r==null?void 0:r.checkpoint,checkpoint_id:r==null?void 0:r.checkpointId,webhook:r==null?void 0:r.webhook,multitask_strategy:r==null?void 0:r.multitaskStrategy,on_completion:r==null?void 0:r.onCompletion,on_disconnect:r==null?void 0:r.onDisconnect,after_seconds:r==null?void 0:r.afterSeconds,if_not_exists:r==null?void 0:r.ifNotExists,checkpoint_during:r==null?void 0:r.checkpointDuring},a=t==null?"/runs/wait":`/threads/${t}/runs/wait`,[o,l]=await this.fetch(a,{method:"POST",json:i,timeoutMs:null,signal:r==null?void 0:r.signal,withResponse:!0}),c=Gy(l);if(c&&((d=r==null?void 0:r.onRunCreated)==null||d.call(r,c)),((r==null?void 0:r.raiseError)!==void 0?r.raiseError:!0)&&"__error__"in o&&typeof o.__error__=="object"&&o.__error__&&"error"in o.__error__&&"message"in o.__error__)throw new Error(`${(h=o.__error__)==null?void 0:h.error}: ${(m=o.__error__)==null?void 0:m.message}`);return o}async list(t,n){return this.fetch(`/threads/${t}/runs`,{params:{limit:(n==null?void 0:n.limit)??10,offset:(n==null?void 0:n.offset)??0,status:(n==null?void 0:n.status)??void 0}})}async get(t,n){return this.fetch(`/threads/${t}/runs/${n}`)}async cancel(t,n,r=!1,i="interrupt"){return this.fetch(`/threads/${t}/runs/${n}/cancel`,{method:"POST",params:{wait:r?"1":"0",action:i}})}async join(t,n,r){return this.fetch(`/threads/${t}/runs/${n}/join`,{timeoutMs:null,signal:r==null?void 0:r.signal})}async*joinStream(t,n,r){const i=typeof r=="object"&&r!=null&&r instanceof AbortSignal?{signal:r}:r,o=((await this.asyncCaller.fetch(...this.prepareFetchOptions(t!=null?`/threads/${t}/runs/${n}/stream`:`/runs/${n}/stream`,{method:"GET",timeoutMs:null,signal:i==null?void 0:i.signal,headers:i!=null&&i.lastEventId?{"Last-Event-ID":i.lastEventId}:void 0,params:{cancel_on_disconnect:i!=null&&i.cancelOnDisconnect?"1":"0",stream_mode:i==null?void 0:i.streamMode}}))).body||new ReadableStream({start:l=>l.close()})).pipeThrough(new hC).pipeThrough(new pC);yield*nc.fromReadableStream(o)}async delete(t,n){return this.fetch(`/threads/${t}/runs/${n}`,{method:"DELETE"})}}class Q7 extends al{async putItem(t,n,r,i){t.forEach(o=>{if(o.includes("."))throw new Error(`Invalid namespace label '${o}'. Namespace labels cannot contain periods ('.')`)});const a={namespace:t,key:n,value:r,index:i==null?void 0:i.index,ttl:i==null?void 0:i.ttl};return this.fetch("/store/items",{method:"PUT",json:a})}async getItem(t,n,r){t.forEach(o=>{if(o.includes("."))throw new Error(`Invalid namespace label '${o}'. Namespace labels cannot contain periods ('.')`)});const i={namespace:t.join("."),key:n};(r==null?void 0:r.refreshTtl)!==void 0&&(i.refresh_ttl=r.refreshTtl);const a=await this.fetch("/store/items",{params:i});return a?{...a,createdAt:a.created_at,updatedAt:a.updated_at}:null}async deleteItem(t,n){return t.forEach(r=>{if(r.includes("."))throw new Error(`Invalid namespace label '${r}'. Namespace labels cannot contain periods ('.')`)}),this.fetch("/store/items",{method:"DELETE",json:{namespace:t,key:n}})}async searchItems(t,n){const r={namespace_prefix:t,filter:n==null?void 0:n.filter,limit:(n==null?void 0:n.limit)??10,offset:(n==null?void 0:n.offset)??0,query:n==null?void 0:n.query,refresh_ttl:n==null?void 0:n.refreshTtl};return{items:(await this.fetch("/store/items/search",{method:"POST",json:r})).items.map(a=>({...a,createdAt:a.created_at,updatedAt:a.updated_at}))}}async listNamespaces(t){const n={prefix:t==null?void 0:t.prefix,suffix:t==null?void 0:t.suffix,max_depth:t==null?void 0:t.maxDepth,limit:(t==null?void 0:t.limit)??100,offset:(t==null?void 0:t.offset)??0};return this.fetch("/store/namespaces",{method:"POST",json:n})}}class hs extends al{static getOrCached(t,n){if(hs.promiseCache[t]!=null)return hs.promiseCache[t];const r=n();return hs.promiseCache[t]=r,r}async getComponent(t,n){return hs.getOrCached(`${this.apiUrl}-${t}-${n}`,async()=>(await this.asyncCaller.fetch(...this.prepareFetchOptions(`/ui/${t}`,{headers:{Accept:"text/html","Content-Type":"application/json"},method:"POST",json:{name:n}}))).text())}}Object.defineProperty(hs,"promiseCache",{enumerable:!0,configurable:!0,writable:!0,value:{}});class J7{constructor(t){Object.defineProperty(this,"assistants",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"threads",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"runs",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"crons",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"store",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"~ui",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.assistants=new K7(t),this.threads=new X7(t),this.runs=new W7(t),this.crons=new Z7(t),this.store=new Q7(t),this["~ui"]=new hs(t)}}const eB=Object.freeze(Object.defineProperty({__proto__:null,Client:J7},Symbol.toStringTag,{value:"Module"})),tB=(e,t)=>({...Object.fromEntries(Object.entries(e.data).map(([r,i])=>[r,t(i)])),...e.mutations});function nB(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const rB=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,iB=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,aB={};function gC(e,t){return(aB.jsx?iB:rB).test(e)}const sB=/[ \t\n\f\r]/g;function oB(e){return typeof e=="object"?e.type==="text"?yC(e.value):!1:yC(e)}function yC(e){return e.replace(sB,"")===""}class Ec{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}Ec.prototype.normal={};Ec.prototype.property={};Ec.prototype.space=void 0;function f3(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new Ec(n,r,t)}function ow(e){return e.toLowerCase()}class qn{constructor(t,n){this.attribute=n,this.property=t}}qn.prototype.attribute="";qn.prototype.booleanish=!1;qn.prototype.boolean=!1;qn.prototype.commaOrSpaceSeparated=!1;qn.prototype.commaSeparated=!1;qn.prototype.defined=!1;qn.prototype.mustUseProperty=!1;qn.prototype.number=!1;qn.prototype.overloadedBoolean=!1;qn.prototype.property="";qn.prototype.spaceSeparated=!1;qn.prototype.space=void 0;let lB=0;const Ge=As(),Wt=As(),d3=As(),Se=As(),jt=As(),Io=As(),Qn=As();function As(){return 2**++lB}const lw=Object.freeze(Object.defineProperty({__proto__:null,boolean:Ge,booleanish:Wt,commaOrSpaceSeparated:Qn,commaSeparated:Io,number:Se,overloadedBoolean:d3,spaceSeparated:jt},Symbol.toStringTag,{value:"Module"})),Yy=Object.keys(lw);class eS extends qn{constructor(t,n,r,i){let a=-1;if(super(t,n),bC(this,"space",i),typeof r=="number")for(;++a<Yy.length;){const o=Yy[a];bC(this,Yy[a],(r&lw[o])===lw[o])}}}eS.prototype.defined=!0;function bC(e,t,n){n&&(e[t]=n)}function sl(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const a=new eS(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[ow(r)]=r,n[ow(a.attribute)]=r}return new Ec(t,n,e.space)}const h3=sl({properties:{ariaActiveDescendant:null,ariaAtomic:Wt,ariaAutoComplete:null,ariaBusy:Wt,ariaChecked:Wt,ariaColCount:Se,ariaColIndex:Se,ariaColSpan:Se,ariaControls:jt,ariaCurrent:null,ariaDescribedBy:jt,ariaDetails:null,ariaDisabled:Wt,ariaDropEffect:jt,ariaErrorMessage:null,ariaExpanded:Wt,ariaFlowTo:jt,ariaGrabbed:Wt,ariaHasPopup:null,ariaHidden:Wt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:jt,ariaLevel:Se,ariaLive:null,ariaModal:Wt,ariaMultiLine:Wt,ariaMultiSelectable:Wt,ariaOrientation:null,ariaOwns:jt,ariaPlaceholder:null,ariaPosInSet:Se,ariaPressed:Wt,ariaReadOnly:Wt,ariaRelevant:null,ariaRequired:Wt,ariaRoleDescription:jt,ariaRowCount:Se,ariaRowIndex:Se,ariaRowSpan:Se,ariaSelected:Wt,ariaSetSize:Se,ariaSort:null,ariaValueMax:Se,ariaValueMin:Se,ariaValueNow:Se,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function p3(e,t){return t in e?e[t]:t}function m3(e,t){return p3(e,t.toLowerCase())}const uB=sl({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Io,acceptCharset:jt,accessKey:jt,action:null,allow:null,allowFullScreen:Ge,allowPaymentRequest:Ge,allowUserMedia:Ge,alt:null,as:null,async:Ge,autoCapitalize:null,autoComplete:jt,autoFocus:Ge,autoPlay:Ge,blocking:jt,capture:null,charSet:null,checked:Ge,cite:null,className:jt,cols:Se,colSpan:null,content:null,contentEditable:Wt,controls:Ge,controlsList:jt,coords:Se|Io,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ge,defer:Ge,dir:null,dirName:null,disabled:Ge,download:d3,draggable:Wt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ge,formTarget:null,headers:jt,height:Se,hidden:Ge,high:Se,href:null,hrefLang:null,htmlFor:jt,httpEquiv:jt,id:null,imageSizes:null,imageSrcSet:null,inert:Ge,inputMode:null,integrity:null,is:null,isMap:Ge,itemId:null,itemProp:jt,itemRef:jt,itemScope:Ge,itemType:jt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ge,low:Se,manifest:null,max:null,maxLength:Se,media:null,method:null,min:null,minLength:Se,multiple:Ge,muted:Ge,name:null,nonce:null,noModule:Ge,noValidate:Ge,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Ge,optimum:Se,pattern:null,ping:jt,placeholder:null,playsInline:Ge,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ge,referrerPolicy:null,rel:jt,required:Ge,reversed:Ge,rows:Se,rowSpan:Se,sandbox:jt,scope:null,scoped:Ge,seamless:Ge,selected:Ge,shadowRootClonable:Ge,shadowRootDelegatesFocus:Ge,shadowRootMode:null,shape:null,size:Se,sizes:null,slot:null,span:Se,spellCheck:Wt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Se,step:null,style:null,tabIndex:Se,target:null,title:null,translate:null,type:null,typeMustMatch:Ge,useMap:null,value:Wt,width:Se,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:jt,axis:null,background:null,bgColor:null,border:Se,borderColor:null,bottomMargin:Se,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Ge,declare:Ge,event:null,face:null,frame:null,frameBorder:null,hSpace:Se,leftMargin:Se,link:null,longDesc:null,lowSrc:null,marginHeight:Se,marginWidth:Se,noResize:Ge,noHref:Ge,noShade:Ge,noWrap:Ge,object:null,profile:null,prompt:null,rev:null,rightMargin:Se,rules:null,scheme:null,scrolling:Wt,standby:null,summary:null,text:null,topMargin:Se,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Se,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Ge,disableRemotePlayback:Ge,prefix:null,property:null,results:Se,security:null,unselectable:null},space:"html",transform:m3}),cB=sl({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:Qn,accentHeight:Se,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Se,amplitude:Se,arabicForm:null,ascent:Se,attributeName:null,attributeType:null,azimuth:Se,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Se,by:null,calcMode:null,capHeight:Se,className:jt,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:Se,diffuseConstant:Se,direction:null,display:null,dur:null,divisor:Se,dominantBaseline:null,download:Ge,dx:null,dy:null,edgeMode:null,editable:null,elevation:Se,enableBackground:null,end:null,event:null,exponent:Se,externalResourcesRequired:null,fill:null,fillOpacity:Se,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Io,g2:Io,glyphName:Io,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Se,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Se,horizOriginX:Se,horizOriginY:Se,id:null,ideographic:Se,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Se,k:Se,k1:Se,k2:Se,k3:Se,k4:Se,kernelMatrix:Qn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Se,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:Se,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:Se,overlineThickness:Se,paintOrder:null,panose1:null,path:null,pathLength:Se,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:jt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Se,pointsAtY:Se,pointsAtZ:Se,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Qn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Qn,rev:Qn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Qn,requiredFeatures:Qn,requiredFonts:Qn,requiredFormats:Qn,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:Se,specularExponent:Se,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Se,strikethroughThickness:Se,string:null,stroke:null,strokeDashArray:Qn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Se,strokeOpacity:Se,strokeWidth:null,style:null,surfaceScale:Se,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Qn,tabIndex:Se,tableValues:null,target:null,targetX:Se,targetY:Se,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Qn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Se,underlineThickness:Se,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Se,values:null,vAlphabetic:Se,vMathematical:Se,vectorEffect:null,vHanging:Se,vIdeographic:Se,version:null,vertAdvY:Se,vertOriginX:Se,vertOriginY:Se,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Se,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:p3}),g3=sl({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),y3=sl({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:m3}),b3=sl({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),fB={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},dB=/[A-Z]/g,vC=/-[a-z]/g,hB=/^data[-\w.:]+$/i;function pB(e,t){const n=ow(t);let r=t,i=qn;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&hB.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(vC,gB);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!vC.test(a)){let o=a.replace(dB,mB);o.charAt(0)!=="-"&&(o="-"+o),t="data"+o}}i=eS}return new i(r,t)}function mB(e){return"-"+e.toLowerCase()}function gB(e){return e.charAt(1).toUpperCase()}const yB=f3([h3,uB,g3,y3,b3],"html"),tS=f3([h3,cB,g3,y3,b3],"svg");function bB(e){return e.join(" ").trim()}var Eo={},Zy,_C;function vB(){if(_C)return Zy;_C=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,o=/^[;\s]*/,l=/^\s+|\s+$/g,c=`
|
|
62
|
+
`,f="/",d="*",h="",m="comment",g="declaration";Zy=function(w,b){if(typeof w!="string")throw new TypeError("First argument must be a string");if(!w)return[];b=b||{};var _=1,S=1;function x(q){var D=q.match(t);D&&(_+=D.length);var H=q.lastIndexOf(c);S=~H?q.length-H:S+q.length}function A(){var q={line:_,column:S};return function(D){return D.position=new k(q),$(),D}}function k(q){this.start=q,this.end={line:_,column:S},this.source=b.source}k.prototype.content=w;function T(q){var D=new Error(b.source+":"+_+":"+S+": "+q);if(D.reason=q,D.filename=b.source,D.line=_,D.column=S,D.source=w,!b.silent)throw D}function O(q){var D=q.exec(w);if(D){var H=D[0];return x(H),w=w.slice(H.length),D}}function $(){O(n)}function L(q){var D;for(q=q||[];D=M();)D!==!1&&q.push(D);return q}function M(){var q=A();if(!(f!=w.charAt(0)||d!=w.charAt(1))){for(var D=2;h!=w.charAt(D)&&(d!=w.charAt(D)||f!=w.charAt(D+1));)++D;if(D+=2,h===w.charAt(D-1))return T("End of comment missing");var H=w.slice(2,D-2);return S+=2,x(H),w=w.slice(D),S+=2,q({type:m,comment:H})}}function z(){var q=A(),D=O(r);if(D){if(M(),!O(i))return T("property missing ':'");var H=O(a),B=q({type:g,property:v(D[0].replace(e,h)),value:H?v(H[0].replace(e,h)):h});return O(o),B}}function P(){var q=[];L(q);for(var D;D=z();)D!==!1&&(q.push(D),L(q));return q}return $(),P()};function v(w){return w?w.replace(l,h):h}return Zy}var xC;function _B(){if(xC)return Eo;xC=1;var e=Eo&&Eo.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Eo,"__esModule",{value:!0}),Eo.default=n;var t=e(vB());function n(r,i){var a=null;if(!r||typeof r!="string")return a;var o=(0,t.default)(r),l=typeof i=="function";return o.forEach(function(c){if(c.type==="declaration"){var f=c.property,d=c.value;l?i(f,d,c):d&&(a=a||{},a[f]=d)}}),a}return Eo}var Su={},wC;function xB(){if(wC)return Su;wC=1,Object.defineProperty(Su,"__esModule",{value:!0}),Su.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,i=/^-(ms)-/,a=function(f){return!f||n.test(f)||e.test(f)},o=function(f,d){return d.toUpperCase()},l=function(f,d){return"".concat(d,"-")},c=function(f,d){return d===void 0&&(d={}),a(f)?f:(f=f.toLowerCase(),d.reactCompat?f=f.replace(i,l):f=f.replace(r,l),f.replace(t,o))};return Su.camelCase=c,Su}var Eu,SC;function wB(){if(SC)return Eu;SC=1;var e=Eu&&Eu.__importDefault||function(i){return i&&i.__esModule?i:{default:i}},t=e(_B()),n=xB();function r(i,a){var o={};return!i||typeof i!="string"||(0,t.default)(i,function(l,c){l&&c&&(o[(0,n.camelCase)(l,a)]=c)}),o}return r.default=r,Eu=r,Eu}var SB=wB();const EB=zn(SB),v3=_3("end"),nS=_3("start");function _3(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function kB(e){const t=nS(e),n=v3(e);if(t&&n)return{start:t,end:n}}function Uu(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?EC(e.position):"start"in e||"end"in e?EC(e):"line"in e||"column"in e?uw(e):""}function uw(e){return kC(e&&e.line)+":"+kC(e&&e.column)}function EC(e){return uw(e&&e.start)+"-"+uw(e&&e.end)}function kC(e){return e&&typeof e=="number"?e:1}class xn extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",a={},o=!1;if(n&&("line"in n&&"column"in n?a={place:n}:"start"in n&&"end"in n?a={place:n}:"type"in n?a={ancestors:[n],place:n.position}:a={...n}),typeof t=="string"?i=t:!a.cause&&t&&(o=!0,i=t.message,a.cause=t),!a.ruleId&&!a.source&&typeof r=="string"){const c=r.indexOf(":");c===-1?a.ruleId=r:(a.source=r.slice(0,c),a.ruleId=r.slice(c+1))}if(!a.place&&a.ancestors&&a.ancestors){const c=a.ancestors[a.ancestors.length-1];c&&(a.place=c.position)}const l=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.cause||void 0,this.column=l?l.column:void 0,this.fatal=void 0,this.file,this.message=i,this.line=l?l.line:void 0,this.name=Uu(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=o&&a.cause&&typeof a.cause.stack=="string"?a.cause.stack:"",this.actual,this.expected,this.note,this.url}}xn.prototype.file="";xn.prototype.name="";xn.prototype.reason="";xn.prototype.message="";xn.prototype.stack="";xn.prototype.column=void 0;xn.prototype.line=void 0;xn.prototype.ancestors=void 0;xn.prototype.cause=void 0;xn.prototype.fatal=void 0;xn.prototype.place=void 0;xn.prototype.ruleId=void 0;xn.prototype.source=void 0;const rS={}.hasOwnProperty,AB=new Map,TB=/[A-Z]/g,CB=new Set(["table","tbody","thead","tfoot","tr"]),OB=new Set(["td","th"]),x3="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function NB(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=LB(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=PB(n,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?tS:yB,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=w3(i,e,void 0);return a&&typeof a!="string"?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function w3(e,t,n){if(t.type==="element")return RB(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return jB(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return $B(e,t,n);if(t.type==="mdxjsEsm")return MB(e,t);if(t.type==="root")return DB(e,t,n);if(t.type==="text")return IB(e,t)}function RB(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=tS,e.schema=i),e.ancestors.push(t);const a=E3(e,t.tagName,!1),o=zB(e,t);let l=aS(e,t);return CB.has(t.tagName)&&(l=l.filter(function(c){return typeof c=="string"?!oB(c):!0})),S3(e,o,a,t),iS(o,l),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function jB(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}rc(e,t.position)}function MB(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);rc(e,t.position)}function $B(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=tS,e.schema=i),e.ancestors.push(t);const a=t.name===null?e.Fragment:E3(e,t.name,!0),o=qB(e,t),l=aS(e,t);return S3(e,o,a,t),iS(o,l),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function DB(e,t,n){const r={};return iS(r,aS(e,t)),e.create(t,e.Fragment,r,n)}function IB(e,t){return t.value}function S3(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function iS(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function PB(e,t,n){return r;function r(i,a,o,l){const f=Array.isArray(o.children)?n:t;return l?f(a,o,l):f(a,o)}}function LB(e,t){return n;function n(r,i,a,o){const l=Array.isArray(a.children),c=nS(r);return t(i,a,o,l,{columnNumber:c?c.column-1:void 0,fileName:e,lineNumber:c?c.line:void 0},void 0)}}function zB(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&rS.call(t.properties,i)){const a=FB(e,i,t.properties[i]);if(a){const[o,l]=a;e.tableCellAlignToStyle&&o==="align"&&typeof l=="string"&&OB.has(t.tagName)?r=l:n[o]=l}}if(r){const a=n.style||(n.style={});a[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function qB(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const a=r.data.estree.body[0];a.type;const o=a.expression;o.type;const l=o.properties[0];l.type,Object.assign(n,e.evaluater.evaluateExpression(l.argument))}else rc(e,t.position);else{const i=r.name;let a;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const l=r.value.data.estree.body[0];l.type,a=e.evaluater.evaluateExpression(l.expression)}else rc(e,t.position);else a=r.value===null?!0:r.value;n[i]=a}return n}function aS(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:AB;for(;++r<t.children.length;){const a=t.children[r];let o;if(e.passKeys){const c=a.type==="element"?a.tagName:a.type==="mdxJsxFlowElement"||a.type==="mdxJsxTextElement"?a.name:void 0;if(c){const f=i.get(c)||0;o=c+"-"+f,i.set(c,f+1)}}const l=w3(e,a,o);l!==void 0&&n.push(l)}return n}function FB(e,t,n){const r=pB(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?nB(n):bB(n)),r.property==="style"){let i=typeof n=="object"?n:BB(e,String(n));return e.stylePropertyNameCase==="css"&&(i=UB(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?fB[r.property]||r.property:r.attribute,n]}}function BB(e,t){try{return EB(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,i=new xn("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=x3+"#cannot-parse-style-attribute",i}}function E3(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let a=-1,o;for(;++a<i.length;){const l=gC(i[a])?{type:"Identifier",name:i[a]}:{type:"Literal",value:i[a]};o=o?{type:"MemberExpression",object:o,property:l,computed:!!(a&&l.type==="Literal"),optional:!1}:l}r=o}else r=gC(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return rS.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);rc(e)}function rc(e,t){const n=new xn("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=x3+"#cannot-handle-mdx-estrees-without-createevaluater",n}function UB(e){const t={};let n;for(n in e)rS.call(e,n)&&(t[VB(n)]=e[n]);return t}function VB(e){let t=e.replace(TB,HB);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function HB(e){return"-"+e.toLowerCase()}const Ky={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},GB={};function sS(e,t){const n=GB,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return k3(e,r,i)}function k3(e,t,n){if(YB(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return AC(e.children,t,n)}return Array.isArray(e)?AC(e,t,n):""}function AC(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=k3(e[i],t,n);return r.join("")}function YB(e){return!!(e&&typeof e=="object")}const TC=document.createElement("i");function oS(e){const t="&"+e+";";TC.innerHTML=t;const n=TC.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function ar(e,t,n,r){const i=e.length;let a=0,o;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);a<r.length;)o=r.slice(a,a+1e4),o.unshift(t,0),e.splice(...o),a+=1e4,t+=1e4}function gr(e,t){return e.length>0?(ar(e,e.length,0,t),e):t}const CC={}.hasOwnProperty;function A3(e){const t={};let n=-1;for(;++n<e.length;)ZB(t,e[n]);return t}function ZB(e,t){let n;for(n in t){const i=(CC.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];let o;if(a)for(o in a){CC.call(i,o)||(i[o]=[]);const l=a[o];KB(i[o],Array.isArray(l)?l:l?[l]:[])}}}function KB(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);ar(e,0,0,r)}function T3(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function $r(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Tn=Pa(/[A-Za-z]/),_n=Pa(/[\dA-Za-z]/),XB=Pa(/[#-'*+\--9=?A-Z^-~]/);function Bh(e){return e!==null&&(e<32||e===127)}const cw=Pa(/\d/),WB=Pa(/[\dA-Fa-f]/),QB=Pa(/[!-/:-@[-`{-~]/);function Ie(e){return e!==null&&e<-2}function Ct(e){return e!==null&&(e<0||e===32)}function nt(e){return e===-2||e===-1||e===32}const bp=Pa(new RegExp("\\p{P}|\\p{S}","u")),_s=Pa(/\s/);function Pa(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function ol(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const a=e.charCodeAt(n);let o="";if(a===37&&_n(e.charCodeAt(n+1))&&_n(e.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(o=String.fromCharCode(a));else if(a>55295&&a<57344){const l=e.charCodeAt(n+1);a<56320&&l>56319&&l<57344?(o=String.fromCharCode(a,l),i=1):o="�"}else o=String.fromCharCode(a);o&&(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,o=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function st(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let a=0;return o;function o(c){return nt(c)?(e.enter(n),l(c)):t(c)}function l(c){return nt(c)&&a++<i?(e.consume(c),l):(e.exit(n),t(c))}}const JB={tokenize:eU};function eU(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(l){if(l===null){e.consume(l);return}return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),st(e,t,"linePrefix")}function i(l){return e.enter("paragraph"),a(l)}function a(l){const c=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=c),n=c,o(l)}function o(l){if(l===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(l);return}return Ie(l)?(e.consume(l),e.exit("chunkText"),a):(e.consume(l),o)}}const tU={tokenize:nU},OC={tokenize:rU};function nU(e){const t=this,n=[];let r=0,i,a,o;return l;function l(x){if(r<n.length){const A=n[r];return t.containerState=A[1],e.attempt(A[0].continuation,c,f)(x)}return f(x)}function c(x){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&S();const A=t.events.length;let k=A,T;for(;k--;)if(t.events[k][0]==="exit"&&t.events[k][1].type==="chunkFlow"){T=t.events[k][1].end;break}_(r);let O=A;for(;O<t.events.length;)t.events[O][1].end={...T},O++;return ar(t.events,k+1,0,t.events.slice(A)),t.events.length=O,f(x)}return l(x)}function f(x){if(r===n.length){if(!i)return m(x);if(i.currentConstruct&&i.currentConstruct.concrete)return v(x);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(OC,d,h)(x)}function d(x){return i&&S(),_(r),m(x)}function h(x){return t.parser.lazy[t.now().line]=r!==n.length,o=t.now().offset,v(x)}function m(x){return t.containerState={},e.attempt(OC,g,v)(x)}function g(x){return r++,n.push([t.currentConstruct,t.containerState]),m(x)}function v(x){if(x===null){i&&S(),_(0),e.consume(x);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:a}),w(x)}function w(x){if(x===null){b(e.exit("chunkFlow"),!0),_(0),e.consume(x);return}return Ie(x)?(e.consume(x),b(e.exit("chunkFlow")),r=0,t.interrupt=void 0,l):(e.consume(x),w)}function b(x,A){const k=t.sliceStream(x);if(A&&k.push(null),x.previous=a,a&&(a.next=x),a=x,i.defineSkip(x.start),i.write(k),t.parser.lazy[x.start.line]){let T=i.events.length;for(;T--;)if(i.events[T][1].start.offset<o&&(!i.events[T][1].end||i.events[T][1].end.offset>o))return;const O=t.events.length;let $=O,L,M;for(;$--;)if(t.events[$][0]==="exit"&&t.events[$][1].type==="chunkFlow"){if(L){M=t.events[$][1].end;break}L=!0}for(_(r),T=O;T<t.events.length;)t.events[T][1].end={...M},T++;ar(t.events,$+1,0,t.events.slice(O)),t.events.length=T}}function _(x){let A=n.length;for(;A-- >x;){const k=n[A];t.containerState=k[1],k[0].exit.call(t,e)}n.length=x}function S(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function rU(e,t,n){return st(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Ho(e){if(e===null||Ct(e)||_s(e))return 1;if(bp(e))return 2}function vp(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}const fw={name:"attention",resolveAll:iU,tokenize:aU};function iU(e,t){let n=-1,r,i,a,o,l,c,f,d;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;c=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const h={...e[r][1].end},m={...e[n][1].start};NC(h,-c),NC(m,c),o={type:c>1?"strongSequence":"emphasisSequence",start:h,end:{...e[r][1].end}},l={type:c>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:m},a={type:c>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},i={type:c>1?"strong":"emphasis",start:{...o.start},end:{...l.end}},e[r][1].end={...o.start},e[n][1].start={...l.end},f=[],e[r][1].end.offset-e[r][1].start.offset&&(f=gr(f,[["enter",e[r][1],t],["exit",e[r][1],t]])),f=gr(f,[["enter",i,t],["enter",o,t],["exit",o,t],["enter",a,t]]),f=gr(f,vp(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),f=gr(f,[["exit",a,t],["enter",l,t],["exit",l,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(d=2,f=gr(f,[["enter",e[n][1],t],["exit",e[n][1],t]])):d=0,ar(e,r-1,n-r+3,f),n=r+f.length-d-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function aU(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Ho(r);let a;return o;function o(c){return a=c,e.enter("attentionSequence"),l(c)}function l(c){if(c===a)return e.consume(c),l;const f=e.exit("attentionSequence"),d=Ho(c),h=!d||d===2&&i||n.includes(c),m=!i||i===2&&d||n.includes(r);return f._open=!!(a===42?h:h&&(i||!m)),f._close=!!(a===42?m:m&&(d||!h)),t(c)}}function NC(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const sU={name:"autolink",tokenize:oU};function oU(e,t,n){let r=0;return i;function i(g){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(g),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),a}function a(g){return Tn(g)?(e.consume(g),o):g===64?n(g):f(g)}function o(g){return g===43||g===45||g===46||_n(g)?(r=1,l(g)):f(g)}function l(g){return g===58?(e.consume(g),r=0,c):(g===43||g===45||g===46||_n(g))&&r++<32?(e.consume(g),l):(r=0,f(g))}function c(g){return g===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(g),e.exit("autolinkMarker"),e.exit("autolink"),t):g===null||g===32||g===60||Bh(g)?n(g):(e.consume(g),c)}function f(g){return g===64?(e.consume(g),d):XB(g)?(e.consume(g),f):n(g)}function d(g){return _n(g)?h(g):n(g)}function h(g){return g===46?(e.consume(g),r=0,d):g===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(g),e.exit("autolinkMarker"),e.exit("autolink"),t):m(g)}function m(g){if((g===45||_n(g))&&r++<63){const v=g===45?m:h;return e.consume(g),v}return n(g)}}const kc={partial:!0,tokenize:lU};function lU(e,t,n){return r;function r(a){return nt(a)?st(e,i,"linePrefix")(a):i(a)}function i(a){return a===null||Ie(a)?t(a):n(a)}}const C3={continuation:{tokenize:cU},exit:fU,name:"blockQuote",tokenize:uU};function uU(e,t,n){const r=this;return i;function i(o){if(o===62){const l=r.containerState;return l.open||(e.enter("blockQuote",{_container:!0}),l.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(o),e.exit("blockQuoteMarker"),a}return n(o)}function a(o){return nt(o)?(e.enter("blockQuotePrefixWhitespace"),e.consume(o),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(o))}}function cU(e,t,n){const r=this;return i;function i(o){return nt(o)?st(e,a,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o):a(o)}function a(o){return e.attempt(C3,t,n)(o)}}function fU(e){e.exit("blockQuote")}const O3={name:"characterEscape",tokenize:dU};function dU(e,t,n){return r;function r(a){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(a),e.exit("escapeMarker"),i}function i(a){return QB(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(a)}}const N3={name:"characterReference",tokenize:hU};function hU(e,t,n){const r=this;let i=0,a,o;return l;function l(h){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(h),e.exit("characterReferenceMarker"),c}function c(h){return h===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(h),e.exit("characterReferenceMarkerNumeric"),f):(e.enter("characterReferenceValue"),a=31,o=_n,d(h))}function f(h){return h===88||h===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(h),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,o=WB,d):(e.enter("characterReferenceValue"),a=7,o=cw,d(h))}function d(h){if(h===59&&i){const m=e.exit("characterReferenceValue");return o===_n&&!oS(r.sliceSerialize(m))?n(h):(e.enter("characterReferenceMarker"),e.consume(h),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return o(h)&&i++<a?(e.consume(h),d):n(h)}}const RC={partial:!0,tokenize:mU},jC={concrete:!0,name:"codeFenced",tokenize:pU};function pU(e,t,n){const r=this,i={partial:!0,tokenize:k};let a=0,o=0,l;return c;function c(T){return f(T)}function f(T){const O=r.events[r.events.length-1];return a=O&&O[1].type==="linePrefix"?O[2].sliceSerialize(O[1],!0).length:0,l=T,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),d(T)}function d(T){return T===l?(o++,e.consume(T),d):o<3?n(T):(e.exit("codeFencedFenceSequence"),nt(T)?st(e,h,"whitespace")(T):h(T))}function h(T){return T===null||Ie(T)?(e.exit("codeFencedFence"),r.interrupt?t(T):e.check(RC,w,A)(T)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),m(T))}function m(T){return T===null||Ie(T)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),h(T)):nt(T)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),st(e,g,"whitespace")(T)):T===96&&T===l?n(T):(e.consume(T),m)}function g(T){return T===null||Ie(T)?h(T):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),v(T))}function v(T){return T===null||Ie(T)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),h(T)):T===96&&T===l?n(T):(e.consume(T),v)}function w(T){return e.attempt(i,A,b)(T)}function b(T){return e.enter("lineEnding"),e.consume(T),e.exit("lineEnding"),_}function _(T){return a>0&&nt(T)?st(e,S,"linePrefix",a+1)(T):S(T)}function S(T){return T===null||Ie(T)?e.check(RC,w,A)(T):(e.enter("codeFlowValue"),x(T))}function x(T){return T===null||Ie(T)?(e.exit("codeFlowValue"),S(T)):(e.consume(T),x)}function A(T){return e.exit("codeFenced"),t(T)}function k(T,O,$){let L=0;return M;function M(H){return T.enter("lineEnding"),T.consume(H),T.exit("lineEnding"),z}function z(H){return T.enter("codeFencedFence"),nt(H)?st(T,P,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(H):P(H)}function P(H){return H===l?(T.enter("codeFencedFenceSequence"),q(H)):$(H)}function q(H){return H===l?(L++,T.consume(H),q):L>=o?(T.exit("codeFencedFenceSequence"),nt(H)?st(T,D,"whitespace")(H):D(H)):$(H)}function D(H){return H===null||Ie(H)?(T.exit("codeFencedFence"),O(H)):$(H)}}}function mU(e,t,n){const r=this;return i;function i(o){return o===null?n(o):(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),a)}function a(o){return r.parser.lazy[r.now().line]?n(o):t(o)}}const Xy={name:"codeIndented",tokenize:yU},gU={partial:!0,tokenize:bU};function yU(e,t,n){const r=this;return i;function i(f){return e.enter("codeIndented"),st(e,a,"linePrefix",5)(f)}function a(f){const d=r.events[r.events.length-1];return d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?o(f):n(f)}function o(f){return f===null?c(f):Ie(f)?e.attempt(gU,o,c)(f):(e.enter("codeFlowValue"),l(f))}function l(f){return f===null||Ie(f)?(e.exit("codeFlowValue"),o(f)):(e.consume(f),l)}function c(f){return e.exit("codeIndented"),t(f)}}function bU(e,t,n){const r=this;return i;function i(o){return r.parser.lazy[r.now().line]?n(o):Ie(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),i):st(e,a,"linePrefix",5)(o)}function a(o){const l=r.events[r.events.length-1];return l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?t(o):Ie(o)?i(o):n(o)}}const vU={name:"codeText",previous:xU,resolve:_U,tokenize:wU};function _U(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(i=r):(r===t||e[r][1].type==="lineEnding")&&(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function xU(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function wU(e,t,n){let r=0,i,a;return o;function o(h){return e.enter("codeText"),e.enter("codeTextSequence"),l(h)}function l(h){return h===96?(e.consume(h),r++,l):(e.exit("codeTextSequence"),c(h))}function c(h){return h===null?n(h):h===32?(e.enter("space"),e.consume(h),e.exit("space"),c):h===96?(a=e.enter("codeTextSequence"),i=0,d(h)):Ie(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),c):(e.enter("codeTextData"),f(h))}function f(h){return h===null||h===32||h===96||Ie(h)?(e.exit("codeTextData"),c(h)):(e.consume(h),f)}function d(h){return h===96?(e.consume(h),i++,d):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(h)):(a.type="codeTextData",f(h))}}class SU{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const i=n||0;this.setCursor(Math.trunc(t));const a=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&ku(this.left,r),a.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),ku(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),ku(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);ku(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);ku(this.left,n.reverse())}}}function ku(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function R3(e){const t={};let n=-1,r,i,a,o,l,c,f;const d=new SU(e);for(;++n<d.length;){for(;n in t;)n=t[n];if(r=d.get(n),n&&r[1].type==="chunkFlow"&&d.get(n-1)[1].type==="listItemPrefix"&&(c=r[1]._tokenizer.events,a=0,a<c.length&&c[a][1].type==="lineEndingBlank"&&(a+=2),a<c.length&&c[a][1].type==="content"))for(;++a<c.length&&c[a][1].type!=="content";)c[a][1].type==="chunkText"&&(c[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,EU(d,n)),n=t[n],f=!0);else if(r[1]._container){for(a=n,i=void 0;a--;)if(o=d.get(a),o[1].type==="lineEnding"||o[1].type==="lineEndingBlank")o[0]==="enter"&&(i&&(d.get(i)[1].type="lineEndingBlank"),o[1].type="lineEnding",i=a);else if(!(o[1].type==="linePrefix"||o[1].type==="listItemIndent"))break;i&&(r[1].end={...d.get(i)[1].start},l=d.slice(i,n),l.unshift(r),d.splice(i,n-i+1,l))}}return ar(e,0,Number.POSITIVE_INFINITY,d.slice(0)),!f}function EU(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const a=[];let o=n._tokenizer;o||(o=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));const l=o.events,c=[],f={};let d,h,m=-1,g=n,v=0,w=0;const b=[w];for(;g;){for(;e.get(++i)[1]!==g;);a.push(i),g._tokenizer||(d=r.sliceStream(g),g.next||d.push(null),h&&o.defineSkip(g.start),g._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(d),g._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),h=g,g=g.next}for(g=n;++m<l.length;)l[m][0]==="exit"&&l[m-1][0]==="enter"&&l[m][1].type===l[m-1][1].type&&l[m][1].start.line!==l[m][1].end.line&&(w=m+1,b.push(w),g._tokenizer=void 0,g.previous=void 0,g=g.next);for(o.events=[],g?(g._tokenizer=void 0,g.previous=void 0):b.pop(),m=b.length;m--;){const _=l.slice(b[m],b[m+1]),S=a.pop();c.push([S,S+_.length-1]),e.splice(S,2,_)}for(c.reverse(),m=-1;++m<c.length;)f[v+c[m][0]]=v+c[m][1],v+=c[m][1]-c[m][0]-1;return f}const kU={resolve:TU,tokenize:CU},AU={partial:!0,tokenize:OU};function TU(e){return R3(e),e}function CU(e,t){let n;return r;function r(l){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(l)}function i(l){return l===null?a(l):Ie(l)?e.check(AU,o,a)(l):(e.consume(l),i)}function a(l){return e.exit("chunkContent"),e.exit("content"),t(l)}function o(l){return e.consume(l),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function OU(e,t,n){const r=this;return i;function i(o){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),st(e,a,"linePrefix")}function a(o){if(o===null||Ie(o))return n(o);const l=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?t(o):e.interrupt(r.parser.constructs.flow,n,t)(o)}}function j3(e,t,n,r,i,a,o,l,c){const f=c||Number.POSITIVE_INFINITY;let d=0;return h;function h(_){return _===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(_),e.exit(a),m):_===null||_===32||_===41||Bh(_)?n(_):(e.enter(r),e.enter(o),e.enter(l),e.enter("chunkString",{contentType:"string"}),w(_))}function m(_){return _===62?(e.enter(a),e.consume(_),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(l),e.enter("chunkString",{contentType:"string"}),g(_))}function g(_){return _===62?(e.exit("chunkString"),e.exit(l),m(_)):_===null||_===60||Ie(_)?n(_):(e.consume(_),_===92?v:g)}function v(_){return _===60||_===62||_===92?(e.consume(_),g):g(_)}function w(_){return!d&&(_===null||_===41||Ct(_))?(e.exit("chunkString"),e.exit(l),e.exit(o),e.exit(r),t(_)):d<f&&_===40?(e.consume(_),d++,w):_===41?(e.consume(_),d--,w):_===null||_===32||_===40||Bh(_)?n(_):(e.consume(_),_===92?b:w)}function b(_){return _===40||_===41||_===92?(e.consume(_),w):w(_)}}function M3(e,t,n,r,i,a){const o=this;let l=0,c;return f;function f(g){return e.enter(r),e.enter(i),e.consume(g),e.exit(i),e.enter(a),d}function d(g){return l>999||g===null||g===91||g===93&&!c||g===94&&!l&&"_hiddenFootnoteSupport"in o.parser.constructs?n(g):g===93?(e.exit(a),e.enter(i),e.consume(g),e.exit(i),e.exit(r),t):Ie(g)?(e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),d):(e.enter("chunkString",{contentType:"string"}),h(g))}function h(g){return g===null||g===91||g===93||Ie(g)||l++>999?(e.exit("chunkString"),d(g)):(e.consume(g),c||(c=!nt(g)),g===92?m:h)}function m(g){return g===91||g===92||g===93?(e.consume(g),l++,h):h(g)}}function $3(e,t,n,r,i,a){let o;return l;function l(m){return m===34||m===39||m===40?(e.enter(r),e.enter(i),e.consume(m),e.exit(i),o=m===40?41:m,c):n(m)}function c(m){return m===o?(e.enter(i),e.consume(m),e.exit(i),e.exit(r),t):(e.enter(a),f(m))}function f(m){return m===o?(e.exit(a),c(o)):m===null?n(m):Ie(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),st(e,f,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),d(m))}function d(m){return m===o||m===null||Ie(m)?(e.exit("chunkString"),f(m)):(e.consume(m),m===92?h:d)}function h(m){return m===o||m===92?(e.consume(m),d):d(m)}}function Vu(e,t){let n;return r;function r(i){return Ie(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):nt(i)?st(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const NU={name:"definition",tokenize:jU},RU={partial:!0,tokenize:MU};function jU(e,t,n){const r=this;let i;return a;function a(g){return e.enter("definition"),o(g)}function o(g){return M3.call(r,e,l,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(g)}function l(g){return i=$r(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),g===58?(e.enter("definitionMarker"),e.consume(g),e.exit("definitionMarker"),c):n(g)}function c(g){return Ct(g)?Vu(e,f)(g):f(g)}function f(g){return j3(e,d,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(g)}function d(g){return e.attempt(RU,h,h)(g)}function h(g){return nt(g)?st(e,m,"whitespace")(g):m(g)}function m(g){return g===null||Ie(g)?(e.exit("definition"),r.parser.defined.push(i),t(g)):n(g)}}function MU(e,t,n){return r;function r(l){return Ct(l)?Vu(e,i)(l):n(l)}function i(l){return $3(e,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(l)}function a(l){return nt(l)?st(e,o,"whitespace")(l):o(l)}function o(l){return l===null||Ie(l)?t(l):n(l)}}const $U={name:"hardBreakEscape",tokenize:DU};function DU(e,t,n){return r;function r(a){return e.enter("hardBreakEscape"),e.consume(a),i}function i(a){return Ie(a)?(e.exit("hardBreakEscape"),t(a)):n(a)}}const IU={name:"headingAtx",resolve:PU,tokenize:LU};function PU(e,t){let n=e.length-2,r=3,i,a;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},a={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},ar(e,r,n-r+1,[["enter",i,t],["enter",a,t],["exit",a,t],["exit",i,t]])),e}function LU(e,t,n){let r=0;return i;function i(d){return e.enter("atxHeading"),a(d)}function a(d){return e.enter("atxHeadingSequence"),o(d)}function o(d){return d===35&&r++<6?(e.consume(d),o):d===null||Ct(d)?(e.exit("atxHeadingSequence"),l(d)):n(d)}function l(d){return d===35?(e.enter("atxHeadingSequence"),c(d)):d===null||Ie(d)?(e.exit("atxHeading"),t(d)):nt(d)?st(e,l,"whitespace")(d):(e.enter("atxHeadingText"),f(d))}function c(d){return d===35?(e.consume(d),c):(e.exit("atxHeadingSequence"),l(d))}function f(d){return d===null||d===35||Ct(d)?(e.exit("atxHeadingText"),l(d)):(e.consume(d),f)}}const zU=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],MC=["pre","script","style","textarea"],qU={concrete:!0,name:"htmlFlow",resolveTo:UU,tokenize:VU},FU={partial:!0,tokenize:GU},BU={partial:!0,tokenize:HU};function UU(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function VU(e,t,n){const r=this;let i,a,o,l,c;return f;function f(j){return d(j)}function d(j){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(j),h}function h(j){return j===33?(e.consume(j),m):j===47?(e.consume(j),a=!0,w):j===63?(e.consume(j),i=3,r.interrupt?t:R):Tn(j)?(e.consume(j),o=String.fromCharCode(j),b):n(j)}function m(j){return j===45?(e.consume(j),i=2,g):j===91?(e.consume(j),i=5,l=0,v):Tn(j)?(e.consume(j),i=4,r.interrupt?t:R):n(j)}function g(j){return j===45?(e.consume(j),r.interrupt?t:R):n(j)}function v(j){const I="CDATA[";return j===I.charCodeAt(l++)?(e.consume(j),l===I.length?r.interrupt?t:P:v):n(j)}function w(j){return Tn(j)?(e.consume(j),o=String.fromCharCode(j),b):n(j)}function b(j){if(j===null||j===47||j===62||Ct(j)){const I=j===47,U=o.toLowerCase();return!I&&!a&&MC.includes(U)?(i=1,r.interrupt?t(j):P(j)):zU.includes(o.toLowerCase())?(i=6,I?(e.consume(j),_):r.interrupt?t(j):P(j)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(j):a?S(j):x(j))}return j===45||_n(j)?(e.consume(j),o+=String.fromCharCode(j),b):n(j)}function _(j){return j===62?(e.consume(j),r.interrupt?t:P):n(j)}function S(j){return nt(j)?(e.consume(j),S):M(j)}function x(j){return j===47?(e.consume(j),M):j===58||j===95||Tn(j)?(e.consume(j),A):nt(j)?(e.consume(j),x):M(j)}function A(j){return j===45||j===46||j===58||j===95||_n(j)?(e.consume(j),A):k(j)}function k(j){return j===61?(e.consume(j),T):nt(j)?(e.consume(j),k):x(j)}function T(j){return j===null||j===60||j===61||j===62||j===96?n(j):j===34||j===39?(e.consume(j),c=j,O):nt(j)?(e.consume(j),T):$(j)}function O(j){return j===c?(e.consume(j),c=null,L):j===null||Ie(j)?n(j):(e.consume(j),O)}function $(j){return j===null||j===34||j===39||j===47||j===60||j===61||j===62||j===96||Ct(j)?k(j):(e.consume(j),$)}function L(j){return j===47||j===62||nt(j)?x(j):n(j)}function M(j){return j===62?(e.consume(j),z):n(j)}function z(j){return j===null||Ie(j)?P(j):nt(j)?(e.consume(j),z):n(j)}function P(j){return j===45&&i===2?(e.consume(j),B):j===60&&i===1?(e.consume(j),G):j===62&&i===4?(e.consume(j),V):j===63&&i===3?(e.consume(j),R):j===93&&i===5?(e.consume(j),Q):Ie(j)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(FU,X,q)(j)):j===null||Ie(j)?(e.exit("htmlFlowData"),q(j)):(e.consume(j),P)}function q(j){return e.check(BU,D,X)(j)}function D(j){return e.enter("lineEnding"),e.consume(j),e.exit("lineEnding"),H}function H(j){return j===null||Ie(j)?q(j):(e.enter("htmlFlowData"),P(j))}function B(j){return j===45?(e.consume(j),R):P(j)}function G(j){return j===47?(e.consume(j),o="",K):P(j)}function K(j){if(j===62){const I=o.toLowerCase();return MC.includes(I)?(e.consume(j),V):P(j)}return Tn(j)&&o.length<8?(e.consume(j),o+=String.fromCharCode(j),K):P(j)}function Q(j){return j===93?(e.consume(j),R):P(j)}function R(j){return j===62?(e.consume(j),V):j===45&&i===2?(e.consume(j),R):P(j)}function V(j){return j===null||Ie(j)?(e.exit("htmlFlowData"),X(j)):(e.consume(j),V)}function X(j){return e.exit("htmlFlow"),t(j)}}function HU(e,t,n){const r=this;return i;function i(o){return Ie(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),a):n(o)}function a(o){return r.parser.lazy[r.now().line]?n(o):t(o)}}function GU(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(kc,t,n)}}const YU={name:"htmlText",tokenize:ZU};function ZU(e,t,n){const r=this;let i,a,o;return l;function l(R){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(R),c}function c(R){return R===33?(e.consume(R),f):R===47?(e.consume(R),k):R===63?(e.consume(R),x):Tn(R)?(e.consume(R),$):n(R)}function f(R){return R===45?(e.consume(R),d):R===91?(e.consume(R),a=0,v):Tn(R)?(e.consume(R),S):n(R)}function d(R){return R===45?(e.consume(R),g):n(R)}function h(R){return R===null?n(R):R===45?(e.consume(R),m):Ie(R)?(o=h,G(R)):(e.consume(R),h)}function m(R){return R===45?(e.consume(R),g):h(R)}function g(R){return R===62?B(R):R===45?m(R):h(R)}function v(R){const V="CDATA[";return R===V.charCodeAt(a++)?(e.consume(R),a===V.length?w:v):n(R)}function w(R){return R===null?n(R):R===93?(e.consume(R),b):Ie(R)?(o=w,G(R)):(e.consume(R),w)}function b(R){return R===93?(e.consume(R),_):w(R)}function _(R){return R===62?B(R):R===93?(e.consume(R),_):w(R)}function S(R){return R===null||R===62?B(R):Ie(R)?(o=S,G(R)):(e.consume(R),S)}function x(R){return R===null?n(R):R===63?(e.consume(R),A):Ie(R)?(o=x,G(R)):(e.consume(R),x)}function A(R){return R===62?B(R):x(R)}function k(R){return Tn(R)?(e.consume(R),T):n(R)}function T(R){return R===45||_n(R)?(e.consume(R),T):O(R)}function O(R){return Ie(R)?(o=O,G(R)):nt(R)?(e.consume(R),O):B(R)}function $(R){return R===45||_n(R)?(e.consume(R),$):R===47||R===62||Ct(R)?L(R):n(R)}function L(R){return R===47?(e.consume(R),B):R===58||R===95||Tn(R)?(e.consume(R),M):Ie(R)?(o=L,G(R)):nt(R)?(e.consume(R),L):B(R)}function M(R){return R===45||R===46||R===58||R===95||_n(R)?(e.consume(R),M):z(R)}function z(R){return R===61?(e.consume(R),P):Ie(R)?(o=z,G(R)):nt(R)?(e.consume(R),z):L(R)}function P(R){return R===null||R===60||R===61||R===62||R===96?n(R):R===34||R===39?(e.consume(R),i=R,q):Ie(R)?(o=P,G(R)):nt(R)?(e.consume(R),P):(e.consume(R),D)}function q(R){return R===i?(e.consume(R),i=void 0,H):R===null?n(R):Ie(R)?(o=q,G(R)):(e.consume(R),q)}function D(R){return R===null||R===34||R===39||R===60||R===61||R===96?n(R):R===47||R===62||Ct(R)?L(R):(e.consume(R),D)}function H(R){return R===47||R===62||Ct(R)?L(R):n(R)}function B(R){return R===62?(e.consume(R),e.exit("htmlTextData"),e.exit("htmlText"),t):n(R)}function G(R){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(R),e.exit("lineEnding"),K}function K(R){return nt(R)?st(e,Q,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(R):Q(R)}function Q(R){return e.enter("htmlTextData"),o(R)}}const lS={name:"labelEnd",resolveAll:QU,resolveTo:JU,tokenize:eV},KU={tokenize:tV},XU={tokenize:nV},WU={tokenize:rV};function QU(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const i=r.type==="labelImage"?4:2;r.type="data",t+=i}}return e.length!==n.length&&ar(e,0,e.length,n),e}function JU(e,t){let n=e.length,r=0,i,a,o,l;for(;n--;)if(i=e[n][1],a){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(o){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(a=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(o=n);const c={type:e[a][1].type==="labelLink"?"link":"image",start:{...e[a][1].start},end:{...e[e.length-1][1].end}},f={type:"label",start:{...e[a][1].start},end:{...e[o][1].end}},d={type:"labelText",start:{...e[a+r+2][1].end},end:{...e[o-2][1].start}};return l=[["enter",c,t],["enter",f,t]],l=gr(l,e.slice(a+1,a+r+3)),l=gr(l,[["enter",d,t]]),l=gr(l,vp(t.parser.constructs.insideSpan.null,e.slice(a+r+4,o-3),t)),l=gr(l,[["exit",d,t],e[o-2],e[o-1],["exit",f,t]]),l=gr(l,e.slice(o+1)),l=gr(l,[["exit",c,t]]),ar(e,a,e.length,l),e}function eV(e,t,n){const r=this;let i=r.events.length,a,o;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){a=r.events[i][1];break}return l;function l(m){return a?a._inactive?h(m):(o=r.parser.defined.includes($r(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(m),e.exit("labelMarker"),e.exit("labelEnd"),c):n(m)}function c(m){return m===40?e.attempt(KU,d,o?d:h)(m):m===91?e.attempt(XU,d,o?f:h)(m):o?d(m):h(m)}function f(m){return e.attempt(WU,d,h)(m)}function d(m){return t(m)}function h(m){return a._balanced=!0,n(m)}}function tV(e,t,n){return r;function r(h){return e.enter("resource"),e.enter("resourceMarker"),e.consume(h),e.exit("resourceMarker"),i}function i(h){return Ct(h)?Vu(e,a)(h):a(h)}function a(h){return h===41?d(h):j3(e,o,l,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(h)}function o(h){return Ct(h)?Vu(e,c)(h):d(h)}function l(h){return n(h)}function c(h){return h===34||h===39||h===40?$3(e,f,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(h):d(h)}function f(h){return Ct(h)?Vu(e,d)(h):d(h)}function d(h){return h===41?(e.enter("resourceMarker"),e.consume(h),e.exit("resourceMarker"),e.exit("resource"),t):n(h)}}function nV(e,t,n){const r=this;return i;function i(l){return M3.call(r,e,a,o,"reference","referenceMarker","referenceString")(l)}function a(l){return r.parser.defined.includes($r(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(l):n(l)}function o(l){return n(l)}}function rV(e,t,n){return r;function r(a){return e.enter("reference"),e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),i}function i(a){return a===93?(e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),e.exit("reference"),t):n(a)}}const iV={name:"labelStartImage",resolveAll:lS.resolveAll,tokenize:aV};function aV(e,t,n){const r=this;return i;function i(l){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(l),e.exit("labelImageMarker"),a}function a(l){return l===91?(e.enter("labelMarker"),e.consume(l),e.exit("labelMarker"),e.exit("labelImage"),o):n(l)}function o(l){return l===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(l):t(l)}}const sV={name:"labelStartLink",resolveAll:lS.resolveAll,tokenize:oV};function oV(e,t,n){const r=this;return i;function i(o){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(o),e.exit("labelMarker"),e.exit("labelLink"),a}function a(o){return o===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(o):t(o)}}const Wy={name:"lineEnding",tokenize:lV};function lV(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),st(e,t,"linePrefix")}}const Sh={name:"thematicBreak",tokenize:uV};function uV(e,t,n){let r=0,i;return a;function a(f){return e.enter("thematicBreak"),o(f)}function o(f){return i=f,l(f)}function l(f){return f===i?(e.enter("thematicBreakSequence"),c(f)):r>=3&&(f===null||Ie(f))?(e.exit("thematicBreak"),t(f)):n(f)}function c(f){return f===i?(e.consume(f),r++,c):(e.exit("thematicBreakSequence"),nt(f)?st(e,l,"whitespace")(f):l(f))}}const Pn={continuation:{tokenize:hV},exit:mV,name:"list",tokenize:dV},cV={partial:!0,tokenize:gV},fV={partial:!0,tokenize:pV};function dV(e,t,n){const r=this,i=r.events[r.events.length-1];let a=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,o=0;return l;function l(g){const v=r.containerState.type||(g===42||g===43||g===45?"listUnordered":"listOrdered");if(v==="listUnordered"?!r.containerState.marker||g===r.containerState.marker:cw(g)){if(r.containerState.type||(r.containerState.type=v,e.enter(v,{_container:!0})),v==="listUnordered")return e.enter("listItemPrefix"),g===42||g===45?e.check(Sh,n,f)(g):f(g);if(!r.interrupt||g===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),c(g)}return n(g)}function c(g){return cw(g)&&++o<10?(e.consume(g),c):(!r.interrupt||o<2)&&(r.containerState.marker?g===r.containerState.marker:g===41||g===46)?(e.exit("listItemValue"),f(g)):n(g)}function f(g){return e.enter("listItemMarker"),e.consume(g),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||g,e.check(kc,r.interrupt?n:d,e.attempt(cV,m,h))}function d(g){return r.containerState.initialBlankLine=!0,a++,m(g)}function h(g){return nt(g)?(e.enter("listItemPrefixWhitespace"),e.consume(g),e.exit("listItemPrefixWhitespace"),m):n(g)}function m(g){return r.containerState.size=a+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(g)}}function hV(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(kc,i,a);function i(l){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,st(e,t,"listItemIndent",r.containerState.size+1)(l)}function a(l){return r.containerState.furtherBlankLines||!nt(l)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(l)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(fV,t,o)(l))}function o(l){return r.containerState._closeFlow=!0,r.interrupt=void 0,st(e,e.attempt(Pn,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l)}}function pV(e,t,n){const r=this;return st(e,i,"listItemIndent",r.containerState.size+1);function i(a){const o=r.events[r.events.length-1];return o&&o[1].type==="listItemIndent"&&o[2].sliceSerialize(o[1],!0).length===r.containerState.size?t(a):n(a)}}function mV(e){e.exit(this.containerState.type)}function gV(e,t,n){const r=this;return st(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(a){const o=r.events[r.events.length-1];return!nt(a)&&o&&o[1].type==="listItemPrefixWhitespace"?t(a):n(a)}}const $C={name:"setextUnderline",resolveTo:yV,tokenize:bV};function yV(e,t){let n=e.length,r,i,a;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!a&&e[n][1].type==="definition"&&(a=n);const o={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",a?(e.splice(i,0,["enter",o,t]),e.splice(a+1,0,["exit",e[r][1],t]),e[r][1].end={...e[a][1].end}):e[r][1]=o,e.push(["exit",o,t]),e}function bV(e,t,n){const r=this;let i;return a;function a(f){let d=r.events.length,h;for(;d--;)if(r.events[d][1].type!=="lineEnding"&&r.events[d][1].type!=="linePrefix"&&r.events[d][1].type!=="content"){h=r.events[d][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||h)?(e.enter("setextHeadingLine"),i=f,o(f)):n(f)}function o(f){return e.enter("setextHeadingLineSequence"),l(f)}function l(f){return f===i?(e.consume(f),l):(e.exit("setextHeadingLineSequence"),nt(f)?st(e,c,"lineSuffix")(f):c(f))}function c(f){return f===null||Ie(f)?(e.exit("setextHeadingLine"),t(f)):n(f)}}const vV={tokenize:_V};function _V(e){const t=this,n=e.attempt(kc,r,e.attempt(this.parser.constructs.flowInitial,i,st(e,e.attempt(this.parser.constructs.flow,i,e.attempt(kU,i)),"linePrefix")));return n;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEndingBlank"),e.consume(a),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const xV={resolveAll:I3()},wV=D3("string"),SV=D3("text");function D3(e){return{resolveAll:I3(e==="text"?EV:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],a=n.attempt(i,o,l);return o;function o(d){return f(d)?a(d):l(d)}function l(d){if(d===null){n.consume(d);return}return n.enter("data"),n.consume(d),c}function c(d){return f(d)?(n.exit("data"),a(d)):(n.consume(d),c)}function f(d){if(d===null)return!0;const h=i[d];let m=-1;if(h)for(;++m<h.length;){const g=h[m];if(!g.previous||g.previous.call(r,r.previous))return!0}return!1}}}function I3(e){return t;function t(n,r){let i=-1,a;for(;++i<=n.length;)a===void 0?n[i]&&n[i][1].type==="data"&&(a=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==a+2&&(n[a][1].end=n[i-1][1].end,n.splice(a+2,i-a-2),i=a+2),a=void 0);return e?e(n,r):n}}function EV(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],i=t.sliceStream(r);let a=i.length,o=-1,l=0,c;for(;a--;){const f=i[a];if(typeof f=="string"){for(o=f.length;f.charCodeAt(o-1)===32;)l++,o--;if(o)break;o=-1}else if(f===-2)c=!0,l++;else if(f!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(l=0),l){const f={type:n===e.length||c||l<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:a?o:r.start._bufferIndex+o,_index:r.start._index+a,line:r.end.line,column:r.end.column-l,offset:r.end.offset-l},end:{...r.end}};r.end={...f.start},r.start.offset===r.end.offset?Object.assign(r,f):(e.splice(n,0,["enter",f,t],["exit",f,t]),n+=2)}n++}return e}const kV={42:Pn,43:Pn,45:Pn,48:Pn,49:Pn,50:Pn,51:Pn,52:Pn,53:Pn,54:Pn,55:Pn,56:Pn,57:Pn,62:C3},AV={91:NU},TV={[-2]:Xy,[-1]:Xy,32:Xy},CV={35:IU,42:Sh,45:[$C,Sh],60:qU,61:$C,95:Sh,96:jC,126:jC},OV={38:N3,92:O3},NV={[-5]:Wy,[-4]:Wy,[-3]:Wy,33:iV,38:N3,42:fw,60:[sU,YU],91:sV,92:[$U,O3],93:lS,95:fw,96:vU},RV={null:[fw,xV]},jV={null:[42,95]},MV={null:[]},$V=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:jV,contentInitial:AV,disable:MV,document:kV,flow:CV,flowInitial:TV,insideSpan:RV,string:OV,text:NV},Symbol.toStringTag,{value:"Module"}));function DV(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const i={},a=[];let o=[],l=[];const c={attempt:O(k),check:O(T),consume:S,enter:x,exit:A,interrupt:O(T,{interrupt:!0})},f={code:null,containerState:{},defineSkip:w,events:[],now:v,parser:e,previous:null,sliceSerialize:m,sliceStream:g,write:h};let d=t.tokenize.call(f,c);return t.resolveAll&&a.push(t),f;function h(z){return o=gr(o,z),b(),o[o.length-1]!==null?[]:($(t,0),f.events=vp(a,f.events,f),f.events)}function m(z,P){return PV(g(z),P)}function g(z){return IV(o,z)}function v(){const{_bufferIndex:z,_index:P,line:q,column:D,offset:H}=r;return{_bufferIndex:z,_index:P,line:q,column:D,offset:H}}function w(z){i[z.line]=z.column,M()}function b(){let z;for(;r._index<o.length;){const P=o[r._index];if(typeof P=="string")for(z=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===z&&r._bufferIndex<P.length;)_(P.charCodeAt(r._bufferIndex));else _(P)}}function _(z){d=d(z)}function S(z){Ie(z)?(r.line++,r.column=1,r.offset+=z===-3?2:1,M()):z!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),f.previous=z}function x(z,P){const q=P||{};return q.type=z,q.start=v(),f.events.push(["enter",q,f]),l.push(q),q}function A(z){const P=l.pop();return P.end=v(),f.events.push(["exit",P,f]),P}function k(z,P){$(z,P.from)}function T(z,P){P.restore()}function O(z,P){return q;function q(D,H,B){let G,K,Q,R;return Array.isArray(D)?X(D):"tokenize"in D?X([D]):V(D);function V(Y){return ne;function ne(ae){const re=ae!==null&&Y[ae],le=ae!==null&&Y.null,W=[...Array.isArray(re)?re:re?[re]:[],...Array.isArray(le)?le:le?[le]:[]];return X(W)(ae)}}function X(Y){return G=Y,K=0,Y.length===0?B:j(Y[K])}function j(Y){return ne;function ne(ae){return R=L(),Q=Y,Y.partial||(f.currentConstruct=Y),Y.name&&f.parser.constructs.disable.null.includes(Y.name)?U():Y.tokenize.call(P?Object.assign(Object.create(f),P):f,c,I,U)(ae)}}function I(Y){return z(Q,R),H}function U(Y){return R.restore(),++K<G.length?j(G[K]):B}}}function $(z,P){z.resolveAll&&!a.includes(z)&&a.push(z),z.resolve&&ar(f.events,P,f.events.length-P,z.resolve(f.events.slice(P),f)),z.resolveTo&&(f.events=z.resolveTo(f.events,f))}function L(){const z=v(),P=f.previous,q=f.currentConstruct,D=f.events.length,H=Array.from(l);return{from:D,restore:B};function B(){r=z,f.previous=P,f.currentConstruct=q,f.events.length=D,l=H,M()}}function M(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function IV(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex;let o;if(n===i)o=[e[n].slice(r,a)];else{if(o=e.slice(n,i),r>-1){const l=o[0];typeof l=="string"?o[0]=l.slice(r):o.shift()}a>0&&o.push(e[i].slice(0,a))}return o}function PV(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const a=e[n];let o;if(typeof a=="string")o=a;else switch(a){case-5:{o="\r";break}case-4:{o=`
|
|
63
|
+
`;break}case-3:{o=`\r
|
|
64
|
+
`;break}case-2:{o=t?" ":" ";break}case-1:{if(!t&&i)continue;o=" ";break}default:o=String.fromCharCode(a)}i=a===-2,r.push(o)}return r.join("")}function LV(e){const r={constructs:A3([$V,...(e||{}).extensions||[]]),content:i(JB),defined:[],document:i(tU),flow:i(vV),lazy:{},string:i(wV),text:i(SV)};return r;function i(a){return o;function o(l){return DV(r,a,l)}}}function zV(e){for(;!R3(e););return e}const DC=/[\0\t\n\r]/g;function qV(){let e=1,t="",n=!0,r;return i;function i(a,o,l){const c=[];let f,d,h,m,g;for(a=t+(typeof a=="string"?a.toString():new TextDecoder(o||void 0).decode(a)),h=0,t="",n&&(a.charCodeAt(0)===65279&&h++,n=void 0);h<a.length;){if(DC.lastIndex=h,f=DC.exec(a),m=f&&f.index!==void 0?f.index:a.length,g=a.charCodeAt(m),!f){t=a.slice(h);break}if(g===10&&h===m&&r)c.push(-3),r=void 0;else switch(r&&(c.push(-5),r=void 0),h<m&&(c.push(a.slice(h,m)),e+=m-h),g){case 0:{c.push(65533),e++;break}case 9:{for(d=Math.ceil(e/4)*4,c.push(-2);e++<d;)c.push(-1);break}case 10:{c.push(-4),e=1;break}default:r=!0,e=1}h=m+1}return l&&(r&&c.push(-5),t&&c.push(t),c.push(null)),c}}const FV=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function BV(e){return e.replace(FV,UV)}function UV(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),a=i===120||i===88;return T3(n.slice(a?2:1),a?16:10)}return oS(n)||e}const P3={}.hasOwnProperty;function VV(e,t,n){return typeof t!="string"&&(n=t,t=void 0),HV(n)(zV(LV(n).document().write(qV()(e,t,!0))))}function HV(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(qe),autolinkProtocol:L,autolinkEmail:L,atxHeading:a(me),blockQuote:a(le),characterEscape:L,characterReference:L,codeFenced:a(W),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:a(W,o),codeText:a(J,o),codeTextData:L,data:L,codeFlowValue:L,definition:a(se),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:a(fe),hardBreakEscape:a(xe),hardBreakTrailing:a(xe),htmlFlow:a(we,o),htmlFlowData:L,htmlText:a(we,o),htmlTextData:L,image:a(Ve),label:o,link:a(qe),listItem:a(He),listItemValue:m,listOrdered:a(We,h),listUnordered:a(We),paragraph:a($e),reference:j,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:a(me),strong:a(Be),thematicBreak:a(kt)},exit:{atxHeading:c(),atxHeadingSequence:k,autolink:c(),autolinkEmail:re,autolinkProtocol:ae,blockQuote:c(),characterEscapeValue:M,characterReferenceMarkerHexadecimal:U,characterReferenceMarkerNumeric:U,characterReferenceValue:Y,characterReference:ne,codeFenced:c(b),codeFencedFence:w,codeFencedFenceInfo:g,codeFencedFenceMeta:v,codeFlowValue:M,codeIndented:c(_),codeText:c(H),codeTextData:M,data:M,definition:c(),definitionDestinationString:A,definitionLabelString:S,definitionTitleString:x,emphasis:c(),hardBreakEscape:c(P),hardBreakTrailing:c(P),htmlFlow:c(q),htmlFlowData:M,htmlText:c(D),htmlTextData:M,image:c(G),label:Q,labelText:K,lineEnding:z,link:c(B),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:I,resourceDestinationString:R,resourceTitleString:V,resource:X,setextHeading:c($),setextHeadingLineSequence:O,setextHeadingText:T,strong:c(),thematicBreak:c()}};L3(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(pe){let _e={type:"root",children:[]};const Te={stack:[_e],tokenStack:[],config:t,enter:l,exit:f,buffer:o,resume:d,data:n},je=[];let rt=-1;for(;++rt<pe.length;)if(pe[rt][1].type==="listOrdered"||pe[rt][1].type==="listUnordered")if(pe[rt][0]==="enter")je.push(rt);else{const cn=je.pop();rt=i(pe,cn,rt)}for(rt=-1;++rt<pe.length;){const cn=t[pe[rt][0]];P3.call(cn,pe[rt][1].type)&&cn[pe[rt][1].type].call(Object.assign({sliceSerialize:pe[rt][2].sliceSerialize},Te),pe[rt][1])}if(Te.tokenStack.length>0){const cn=Te.tokenStack[Te.tokenStack.length-1];(cn[1]||IC).call(Te,void 0,cn[0])}for(_e.position={start:va(pe.length>0?pe[0][1].start:{line:1,column:1,offset:0}),end:va(pe.length>0?pe[pe.length-2][1].end:{line:1,column:1,offset:0})},rt=-1;++rt<t.transforms.length;)_e=t.transforms[rt](_e)||_e;return _e}function i(pe,_e,Te){let je=_e-1,rt=-1,cn=!1,Cn,$t,Gt,wn;for(;++je<=Te;){const Yt=pe[je];switch(Yt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Yt[0]==="enter"?rt++:rt--,wn=void 0;break}case"lineEndingBlank":{Yt[0]==="enter"&&(Cn&&!wn&&!rt&&!Gt&&(Gt=je),wn=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:wn=void 0}if(!rt&&Yt[0]==="enter"&&Yt[1].type==="listItemPrefix"||rt===-1&&Yt[0]==="exit"&&(Yt[1].type==="listUnordered"||Yt[1].type==="listOrdered")){if(Cn){let On=je;for($t=void 0;On--;){const Bn=pe[On];if(Bn[1].type==="lineEnding"||Bn[1].type==="lineEndingBlank"){if(Bn[0]==="exit")continue;$t&&(pe[$t][1].type="lineEndingBlank",cn=!0),Bn[1].type="lineEnding",$t=On}else if(!(Bn[1].type==="linePrefix"||Bn[1].type==="blockQuotePrefix"||Bn[1].type==="blockQuotePrefixWhitespace"||Bn[1].type==="blockQuoteMarker"||Bn[1].type==="listItemIndent"))break}Gt&&(!$t||Gt<$t)&&(Cn._spread=!0),Cn.end=Object.assign({},$t?pe[$t][1].start:Yt[1].end),pe.splice($t||je,0,["exit",Cn,Yt[2]]),je++,Te++}if(Yt[1].type==="listItemPrefix"){const On={type:"listItem",_spread:!1,start:Object.assign({},Yt[1].start),end:void 0};Cn=On,pe.splice(je,0,["enter",On,Yt[2]]),je++,Te++,Gt=void 0,wn=!0}}}return pe[_e][1]._spread=cn,Te}function a(pe,_e){return Te;function Te(je){l.call(this,pe(je),je),_e&&_e.call(this,je)}}function o(){this.stack.push({type:"fragment",children:[]})}function l(pe,_e,Te){this.stack[this.stack.length-1].children.push(pe),this.stack.push(pe),this.tokenStack.push([_e,Te||void 0]),pe.position={start:va(_e.start),end:void 0}}function c(pe){return _e;function _e(Te){pe&&pe.call(this,Te),f.call(this,Te)}}function f(pe,_e){const Te=this.stack.pop(),je=this.tokenStack.pop();if(je)je[0].type!==pe.type&&(_e?_e.call(this,pe,je[0]):(je[1]||IC).call(this,pe,je[0]));else throw new Error("Cannot close `"+pe.type+"` ("+Uu({start:pe.start,end:pe.end})+"): it’s not open");Te.position.end=va(pe.end)}function d(){return sS(this.stack.pop())}function h(){this.data.expectingFirstListItemValue=!0}function m(pe){if(this.data.expectingFirstListItemValue){const _e=this.stack[this.stack.length-2];_e.start=Number.parseInt(this.sliceSerialize(pe),10),this.data.expectingFirstListItemValue=void 0}}function g(){const pe=this.resume(),_e=this.stack[this.stack.length-1];_e.lang=pe}function v(){const pe=this.resume(),_e=this.stack[this.stack.length-1];_e.meta=pe}function w(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function b(){const pe=this.resume(),_e=this.stack[this.stack.length-1];_e.value=pe.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function _(){const pe=this.resume(),_e=this.stack[this.stack.length-1];_e.value=pe.replace(/(\r?\n|\r)$/g,"")}function S(pe){const _e=this.resume(),Te=this.stack[this.stack.length-1];Te.label=_e,Te.identifier=$r(this.sliceSerialize(pe)).toLowerCase()}function x(){const pe=this.resume(),_e=this.stack[this.stack.length-1];_e.title=pe}function A(){const pe=this.resume(),_e=this.stack[this.stack.length-1];_e.url=pe}function k(pe){const _e=this.stack[this.stack.length-1];if(!_e.depth){const Te=this.sliceSerialize(pe).length;_e.depth=Te}}function T(){this.data.setextHeadingSlurpLineEnding=!0}function O(pe){const _e=this.stack[this.stack.length-1];_e.depth=this.sliceSerialize(pe).codePointAt(0)===61?1:2}function $(){this.data.setextHeadingSlurpLineEnding=void 0}function L(pe){const Te=this.stack[this.stack.length-1].children;let je=Te[Te.length-1];(!je||je.type!=="text")&&(je=Ot(),je.position={start:va(pe.start),end:void 0},Te.push(je)),this.stack.push(je)}function M(pe){const _e=this.stack.pop();_e.value+=this.sliceSerialize(pe),_e.position.end=va(pe.end)}function z(pe){const _e=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Te=_e.children[_e.children.length-1];Te.position.end=va(pe.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(_e.type)&&(L.call(this,pe),M.call(this,pe))}function P(){this.data.atHardBreak=!0}function q(){const pe=this.resume(),_e=this.stack[this.stack.length-1];_e.value=pe}function D(){const pe=this.resume(),_e=this.stack[this.stack.length-1];_e.value=pe}function H(){const pe=this.resume(),_e=this.stack[this.stack.length-1];_e.value=pe}function B(){const pe=this.stack[this.stack.length-1];if(this.data.inReference){const _e=this.data.referenceType||"shortcut";pe.type+="Reference",pe.referenceType=_e,delete pe.url,delete pe.title}else delete pe.identifier,delete pe.label;this.data.referenceType=void 0}function G(){const pe=this.stack[this.stack.length-1];if(this.data.inReference){const _e=this.data.referenceType||"shortcut";pe.type+="Reference",pe.referenceType=_e,delete pe.url,delete pe.title}else delete pe.identifier,delete pe.label;this.data.referenceType=void 0}function K(pe){const _e=this.sliceSerialize(pe),Te=this.stack[this.stack.length-2];Te.label=BV(_e),Te.identifier=$r(_e).toLowerCase()}function Q(){const pe=this.stack[this.stack.length-1],_e=this.resume(),Te=this.stack[this.stack.length-1];if(this.data.inReference=!0,Te.type==="link"){const je=pe.children;Te.children=je}else Te.alt=_e}function R(){const pe=this.resume(),_e=this.stack[this.stack.length-1];_e.url=pe}function V(){const pe=this.resume(),_e=this.stack[this.stack.length-1];_e.title=pe}function X(){this.data.inReference=void 0}function j(){this.data.referenceType="collapsed"}function I(pe){const _e=this.resume(),Te=this.stack[this.stack.length-1];Te.label=_e,Te.identifier=$r(this.sliceSerialize(pe)).toLowerCase(),this.data.referenceType="full"}function U(pe){this.data.characterReferenceType=pe.type}function Y(pe){const _e=this.sliceSerialize(pe),Te=this.data.characterReferenceType;let je;Te?(je=T3(_e,Te==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):je=oS(_e);const rt=this.stack[this.stack.length-1];rt.value+=je}function ne(pe){const _e=this.stack.pop();_e.position.end=va(pe.end)}function ae(pe){M.call(this,pe);const _e=this.stack[this.stack.length-1];_e.url=this.sliceSerialize(pe)}function re(pe){M.call(this,pe);const _e=this.stack[this.stack.length-1];_e.url="mailto:"+this.sliceSerialize(pe)}function le(){return{type:"blockquote",children:[]}}function W(){return{type:"code",lang:null,meta:null,value:""}}function J(){return{type:"inlineCode",value:""}}function se(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function fe(){return{type:"emphasis",children:[]}}function me(){return{type:"heading",depth:0,children:[]}}function xe(){return{type:"break"}}function we(){return{type:"html",value:""}}function Ve(){return{type:"image",title:null,url:"",alt:null}}function qe(){return{type:"link",title:null,url:"",children:[]}}function We(pe){return{type:"list",ordered:pe.type==="listOrdered",start:null,spread:pe._spread,children:[]}}function He(pe){return{type:"listItem",spread:pe._spread,checked:null,children:[]}}function $e(){return{type:"paragraph",children:[]}}function Be(){return{type:"strong",children:[]}}function Ot(){return{type:"text",value:""}}function kt(){return{type:"thematicBreak"}}}function va(e){return{line:e.line,column:e.column,offset:e.offset}}function L3(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?L3(e,r):GV(e,r)}}function GV(e,t){let n;for(n in t)if(P3.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function IC(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Uu({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Uu({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Uu({start:t.start,end:t.end})+") is still open")}function YV(e){const t=this;t.parser=n;function n(r){return VV(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function ZV(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function KV(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
65
|
+
`}]}function XV(e,t){const n=t.value?t.value+`
|
|
66
|
+
`:"",r={};t.lang&&(r.className=["language-"+t.lang]);let i={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(i.data={meta:t.meta}),e.patch(t,i),i=e.applyData(t,i),i={type:"element",tagName:"pre",properties:{},children:[i]},e.patch(t,i),i}function WV(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function QV(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function JV(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=ol(r.toLowerCase()),a=e.footnoteOrder.indexOf(r);let o,l=e.footnoteCounts.get(r);l===void 0?(l=0,e.footnoteOrder.push(r),o=e.footnoteOrder.length):o=a+1,l+=1,e.footnoteCounts.set(r,l);const c={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(l>1?"-"+l:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(o)}]};e.patch(t,c);const f={type:"element",tagName:"sup",properties:{},children:[c]};return e.patch(t,f),e.applyData(t,f)}function eH(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function tH(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function z3(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const i=e.all(t),a=i[0];a&&a.type==="text"?a.value="["+a.value:i.unshift({type:"text",value:"["});const o=i[i.length-1];return o&&o.type==="text"?o.value+=r:i.push({type:"text",value:r}),i}function nH(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return z3(e,t);const i={src:ol(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const a={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)}function rH(e,t){const n={src:ol(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function iH(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function aH(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return z3(e,t);const i={href:ol(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const a={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function sH(e,t){const n={href:ol(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function oH(e,t,n){const r=e.all(t),i=n?lH(n):q3(t),a={},o=[];if(typeof t.checked=="boolean"){const d=r[0];let h;d&&d.type==="element"&&d.tagName==="p"?h=d:(h={type:"element",tagName:"p",properties:{},children:[]},r.unshift(h)),h.children.length>0&&h.children.unshift({type:"text",value:" "}),h.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),a.className=["task-list-item"]}let l=-1;for(;++l<r.length;){const d=r[l];(i||l!==0||d.type!=="element"||d.tagName!=="p")&&o.push({type:"text",value:`
|
|
67
|
+
`}),d.type==="element"&&d.tagName==="p"&&!i?o.push(...d.children):o.push(d)}const c=r[r.length-1];c&&(i||c.type!=="element"||c.tagName!=="p")&&o.push({type:"text",value:`
|
|
68
|
+
`});const f={type:"element",tagName:"li",properties:a,children:o};return e.patch(t,f),e.applyData(t,f)}function lH(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=q3(n[r])}return t}function q3(e){const t=e.spread;return t??e.children.length>1}function uH(e,t){const n={},r=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++i<r.length;){const o=r[i];if(o.type==="element"&&o.tagName==="li"&&o.properties&&Array.isArray(o.properties.className)&&o.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const a={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)}function cH(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function fH(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function dH(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function hH(e,t){const n=e.all(t),r=n.shift(),i=[];if(r){const o={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],o),i.push(o)}if(n.length>0){const o={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},l=nS(t.children[1]),c=v3(t.children[t.children.length-1]);l&&c&&(o.position={start:l,end:c}),i.push(o)}const a={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)}function pH(e,t,n){const r=n?n.children:void 0,a=(r?r.indexOf(t):1)===0?"th":"td",o=n&&n.type==="table"?n.align:void 0,l=o?o.length:t.children.length;let c=-1;const f=[];for(;++c<l;){const h=t.children[c],m={},g=o?o[c]:void 0;g&&(m.align=g);let v={type:"element",tagName:a,properties:m,children:[]};h&&(v.children=e.all(h),e.patch(h,v),v=e.applyData(h,v)),f.push(v)}const d={type:"element",tagName:"tr",properties:{},children:e.wrap(f,!0)};return e.patch(t,d),e.applyData(t,d)}function mH(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const PC=9,LC=32;function gH(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const a=[];for(;r;)a.push(zC(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(zC(t.slice(i),i>0,!1)),a.join("")}function zC(e,t,n){let r=0,i=e.length;if(t){let a=e.codePointAt(r);for(;a===PC||a===LC;)r++,a=e.codePointAt(r)}if(n){let a=e.codePointAt(i-1);for(;a===PC||a===LC;)i--,a=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function yH(e,t){const n={type:"text",value:gH(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function bH(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const vH={blockquote:ZV,break:KV,code:XV,delete:WV,emphasis:QV,footnoteReference:JV,heading:eH,html:tH,imageReference:nH,image:rH,inlineCode:iH,linkReference:aH,link:sH,listItem:oH,list:uH,paragraph:cH,root:fH,strong:dH,table:hH,tableCell:mH,tableRow:pH,text:yH,thematicBreak:bH,toml:yd,yaml:yd,definition:yd,footnoteDefinition:yd};function yd(){}const F3=-1,_p=0,Hu=1,Uh=2,uS=3,cS=4,fS=5,dS=6,B3=7,U3=8,qC=typeof self=="object"?self:globalThis,_H=(e,t)=>{const n=(i,a)=>(e.set(a,i),i),r=i=>{if(e.has(i))return e.get(i);const[a,o]=t[i];switch(a){case _p:case F3:return n(o,i);case Hu:{const l=n([],i);for(const c of o)l.push(r(c));return l}case Uh:{const l=n({},i);for(const[c,f]of o)l[r(c)]=r(f);return l}case uS:return n(new Date(o),i);case cS:{const{source:l,flags:c}=o;return n(new RegExp(l,c),i)}case fS:{const l=n(new Map,i);for(const[c,f]of o)l.set(r(c),r(f));return l}case dS:{const l=n(new Set,i);for(const c of o)l.add(r(c));return l}case B3:{const{name:l,message:c}=o;return n(new qC[l](c),i)}case U3:return n(BigInt(o),i);case"BigInt":return n(Object(BigInt(o)),i);case"ArrayBuffer":return n(new Uint8Array(o).buffer,o);case"DataView":{const{buffer:l}=new Uint8Array(o);return n(new DataView(l),o)}}return n(new qC[a](o),i)};return r},FC=e=>_H(new Map,e)(0),ko="",{toString:xH}={},{keys:wH}=Object,Au=e=>{const t=typeof e;if(t!=="object"||!e)return[_p,t];const n=xH.call(e).slice(8,-1);switch(n){case"Array":return[Hu,ko];case"Object":return[Uh,ko];case"Date":return[uS,ko];case"RegExp":return[cS,ko];case"Map":return[fS,ko];case"Set":return[dS,ko];case"DataView":return[Hu,n]}return n.includes("Array")?[Hu,n]:n.includes("Error")?[B3,n]:[Uh,n]},bd=([e,t])=>e===_p&&(t==="function"||t==="symbol"),SH=(e,t,n,r)=>{const i=(o,l)=>{const c=r.push(o)-1;return n.set(l,c),c},a=o=>{if(n.has(o))return n.get(o);let[l,c]=Au(o);switch(l){case _p:{let d=o;switch(c){case"bigint":l=U3,d=o.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+c);d=null;break;case"undefined":return i([F3],o)}return i([l,d],o)}case Hu:{if(c){let m=o;return c==="DataView"?m=new Uint8Array(o.buffer):c==="ArrayBuffer"&&(m=new Uint8Array(o)),i([c,[...m]],o)}const d=[],h=i([l,d],o);for(const m of o)d.push(a(m));return h}case Uh:{if(c)switch(c){case"BigInt":return i([c,o.toString()],o);case"Boolean":case"Number":case"String":return i([c,o.valueOf()],o)}if(t&&"toJSON"in o)return a(o.toJSON());const d=[],h=i([l,d],o);for(const m of wH(o))(e||!bd(Au(o[m])))&&d.push([a(m),a(o[m])]);return h}case uS:return i([l,o.toISOString()],o);case cS:{const{source:d,flags:h}=o;return i([l,{source:d,flags:h}],o)}case fS:{const d=[],h=i([l,d],o);for(const[m,g]of o)(e||!(bd(Au(m))||bd(Au(g))))&&d.push([a(m),a(g)]);return h}case dS:{const d=[],h=i([l,d],o);for(const m of o)(e||!bd(Au(m)))&&d.push(a(m));return h}}const{message:f}=o;return i([l,{name:c,message:f}],o)};return a},BC=(e,{json:t,lossy:n}={})=>{const r=[];return SH(!(t||n),!!t,new Map,r)(e),r},Vh=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?FC(BC(e,t)):structuredClone(e):(e,t)=>FC(BC(e,t));function EH(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function kH(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function AH(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||EH,r=e.options.footnoteBackLabel||kH,i=e.options.footnoteLabel||"Footnotes",a=e.options.footnoteLabelTagName||"h2",o=e.options.footnoteLabelProperties||{className:["sr-only"]},l=[];let c=-1;for(;++c<e.footnoteOrder.length;){const f=e.footnoteById.get(e.footnoteOrder[c]);if(!f)continue;const d=e.all(f),h=String(f.identifier).toUpperCase(),m=ol(h.toLowerCase());let g=0;const v=[],w=e.footnoteCounts.get(h);for(;w!==void 0&&++g<=w;){v.length>0&&v.push({type:"text",value:" "});let S=typeof n=="string"?n:n(c,g);typeof S=="string"&&(S={type:"text",value:S}),v.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+m+(g>1?"-"+g:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(c,g),className:["data-footnote-backref"]},children:Array.isArray(S)?S:[S]})}const b=d[d.length-1];if(b&&b.type==="element"&&b.tagName==="p"){const S=b.children[b.children.length-1];S&&S.type==="text"?S.value+=" ":b.children.push({type:"text",value:" "}),b.children.push(...v)}else d.push(...v);const _={type:"element",tagName:"li",properties:{id:t+"fn-"+m},children:e.wrap(d,!0)};e.patch(f,_),l.push(_)}if(l.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:{...Vh(o),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
|
|
69
|
+
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(l,!0)},{type:"text",value:`
|
|
70
|
+
`}]}}const xp=function(e){if(e==null)return NH;if(typeof e=="function")return wp(e);if(typeof e=="object")return Array.isArray(e)?TH(e):CH(e);if(typeof e=="string")return OH(e);throw new Error("Expected function, string, or object as test")};function TH(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=xp(e[n]);return wp(r);function r(...i){let a=-1;for(;++a<t.length;)if(t[a].apply(this,i))return!0;return!1}}function CH(e){const t=e;return wp(n);function n(r){const i=r;let a;for(a in e)if(i[a]!==t[a])return!1;return!0}}function OH(e){return wp(t);function t(n){return n&&n.type===e}}function wp(e){return t;function t(n,r,i){return!!(RH(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function NH(){return!0}function RH(e){return e!==null&&typeof e=="object"&&"type"in e}const V3=[],jH=!0,dw=!1,MH="skip";function H3(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const a=xp(i),o=r?-1:1;l(e,void 0,[])();function l(c,f,d){const h=c&&typeof c=="object"?c:{};if(typeof h.type=="string"){const g=typeof h.tagName=="string"?h.tagName:typeof h.name=="string"?h.name:void 0;Object.defineProperty(m,"name",{value:"node ("+(c.type+(g?"<"+g+">":""))+")"})}return m;function m(){let g=V3,v,w,b;if((!t||a(c,f,d[d.length-1]||void 0))&&(g=$H(n(c,d)),g[0]===dw))return g;if("children"in c&&c.children){const _=c;if(_.children&&g[0]!==MH)for(w=(r?_.children.length:-1)+o,b=d.concat(_);w>-1&&w<_.children.length;){const S=_.children[w];if(v=l(S,w,b)(),v[0]===dw)return v;w=typeof v[1]=="number"?v[1]:w+o}}return g}}}function $H(e){return Array.isArray(e)?e:typeof e=="number"?[jH,e]:e==null?V3:[e]}function hS(e,t,n,r){let i,a,o;typeof t=="function"&&typeof n!="function"?(a=void 0,o=t,i=n):(a=t,o=n,i=r),H3(e,a,l,i);function l(c,f){const d=f[f.length-1],h=d?d.children.indexOf(c):void 0;return o(c,h,d)}}const hw={}.hasOwnProperty,DH={};function IH(e,t){const n=t||DH,r=new Map,i=new Map,a=new Map,o={...vH,...n.handlers},l={all:f,applyData:LH,definitionById:r,footnoteById:i,footnoteCounts:a,footnoteOrder:[],handlers:o,one:c,options:n,patch:PH,wrap:qH};return hS(e,function(d){if(d.type==="definition"||d.type==="footnoteDefinition"){const h=d.type==="definition"?r:i,m=String(d.identifier).toUpperCase();h.has(m)||h.set(m,d)}}),l;function c(d,h){const m=d.type,g=l.handlers[m];if(hw.call(l.handlers,m)&&g)return g(l,d,h);if(l.options.passThrough&&l.options.passThrough.includes(m)){if("children"in d){const{children:w,...b}=d,_=Vh(b);return _.children=l.all(d),_}return Vh(d)}return(l.options.unknownHandler||zH)(l,d,h)}function f(d){const h=[];if("children"in d){const m=d.children;let g=-1;for(;++g<m.length;){const v=l.one(m[g],d);if(v){if(g&&m[g-1].type==="break"&&(!Array.isArray(v)&&v.type==="text"&&(v.value=UC(v.value)),!Array.isArray(v)&&v.type==="element")){const w=v.children[0];w&&w.type==="text"&&(w.value=UC(w.value))}Array.isArray(v)?h.push(...v):h.push(v)}}}return h}}function PH(e,t){e.position&&(t.position=kB(e))}function LH(e,t){let n=t;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,a=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const o="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:o}}n.type==="element"&&a&&Object.assign(n.properties,Vh(a)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function zH(e,t){const n=t.data||{},r="value"in t&&!(hw.call(n,"hProperties")||hw.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function qH(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
|
|
71
|
+
`});++r<e.length;)r&&n.push({type:"text",value:`
|
|
72
|
+
`}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
|
|
73
|
+
`}),n}function UC(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function VC(e,t){const n=IH(e,t),r=n.one(e,void 0),i=AH(n),a=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&a.children.push({type:"text",value:`
|
|
74
|
+
`},i),a}function FH(e,t){return e&&"run"in e?async function(n,r){const i=VC(n,{file:r,...t});await e.run(i,r)}:function(n,r){return VC(n,{file:r,...e||t})}}function HC(e){if(e)throw e}var Qy,GC;function BH(){if(GC)return Qy;GC=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=function(f){return typeof Array.isArray=="function"?Array.isArray(f):t.call(f)==="[object Array]"},a=function(f){if(!f||t.call(f)!=="[object Object]")return!1;var d=e.call(f,"constructor"),h=f.constructor&&f.constructor.prototype&&e.call(f.constructor.prototype,"isPrototypeOf");if(f.constructor&&!d&&!h)return!1;var m;for(m in f);return typeof m>"u"||e.call(f,m)},o=function(f,d){n&&d.name==="__proto__"?n(f,d.name,{enumerable:!0,configurable:!0,value:d.newValue,writable:!0}):f[d.name]=d.newValue},l=function(f,d){if(d==="__proto__")if(e.call(f,d)){if(r)return r(f,d).value}else return;return f[d]};return Qy=function c(){var f,d,h,m,g,v,w=arguments[0],b=1,_=arguments.length,S=!1;for(typeof w=="boolean"&&(S=w,w=arguments[1]||{},b=2),(w==null||typeof w!="object"&&typeof w!="function")&&(w={});b<_;++b)if(f=arguments[b],f!=null)for(d in f)h=l(w,d),m=l(f,d),w!==m&&(S&&m&&(a(m)||(g=i(m)))?(g?(g=!1,v=h&&i(h)?h:[]):v=h&&a(h)?h:{},o(w,{name:d,newValue:c(S,v,m)})):typeof m<"u"&&o(w,{name:d,newValue:m}));return w},Qy}var UH=BH();const Jy=zn(UH);function pw(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function VH(){const e=[],t={run:n,use:r};return t;function n(...i){let a=-1;const o=i.pop();if(typeof o!="function")throw new TypeError("Expected function as last argument, not "+o);l(null,...i);function l(c,...f){const d=e[++a];let h=-1;if(c){o(c);return}for(;++h<i.length;)(f[h]===null||f[h]===void 0)&&(f[h]=i[h]);i=f,d?HH(d,l)(...f):o(null,...f)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function HH(e,t){let n;return r;function r(...o){const l=e.length>o.length;let c;l&&o.push(i);try{c=e.apply(this,o)}catch(f){const d=f;if(l&&n)throw d;return i(d)}l||(c&&c.then&&typeof c.then=="function"?c.then(a,i):c instanceof Error?i(c):a(c))}function i(o,...l){n||(n=!0,t(o,...l))}function a(o){i(null,o)}}const Gr={basename:GH,dirname:YH,extname:ZH,join:KH,sep:"/"};function GH(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Ac(e);let n=0,r=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else r<0&&(a=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let o=-1,l=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else o<0&&(a=!0,o=i+1),l>-1&&(e.codePointAt(i)===t.codePointAt(l--)?l<0&&(r=i):(l=-1,r=o));return n===r?r=o:r<0&&(r=e.length),e.slice(n,r)}function YH(e){if(Ac(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function ZH(e){Ac(e);let t=e.length,n=-1,r=0,i=-1,a=0,o;for(;t--;){const l=e.codePointAt(t);if(l===47){if(o){r=t+1;break}continue}n<0&&(o=!0,n=t+1),l===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||n<0||a===0||a===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function KH(...e){let t=-1,n;for(;++t<e.length;)Ac(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":XH(n)}function XH(e){Ac(e);const t=e.codePointAt(0)===47;let n=WH(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function WH(e,t){let n="",r=0,i=-1,a=0,o=-1,l,c;for(;++o<=e.length;){if(o<e.length)l=e.codePointAt(o);else{if(l===47)break;l=47}if(l===47){if(!(i===o-1||a===1))if(i!==o-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(c=n.lastIndexOf("/"),c!==n.length-1){c<0?(n="",r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf("/")),i=o,a=0;continue}}else if(n.length>0){n="",r=0,i=o,a=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,o):n=e.slice(i+1,o),r=o-i-1;i=o,a=0}else l===46&&a>-1?a++:a=-1}return n}function Ac(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const QH={cwd:JH};function JH(){return"/"}function mw(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function eG(e){if(typeof e=="string")e=new URL(e);else if(!mw(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return tG(e)}function tG(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(t)}const e0=["history","path","basename","stem","extname","dirname"];class G3{constructor(t){let n;t?mw(t)?n={path:t}:typeof t=="string"||nG(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":QH.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<e0.length;){const a=e0[r];a in n&&n[a]!==void 0&&n[a]!==null&&(this[a]=a==="history"?[...n[a]]:n[a])}let i;for(i in n)e0.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?Gr.basename(this.path):void 0}set basename(t){n0(t,"basename"),t0(t,"basename"),this.path=Gr.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Gr.dirname(this.path):void 0}set dirname(t){YC(this.basename,"dirname"),this.path=Gr.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Gr.extname(this.path):void 0}set extname(t){if(t0(t,"extname"),YC(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Gr.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){mw(t)&&(t=eG(t)),n0(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Gr.basename(this.path,this.extname):void 0}set stem(t){n0(t,"stem"),t0(t,"stem"),this.path=Gr.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const i=this.message(t,n,r);throw i.fatal=!0,i}info(t,n,r){const i=this.message(t,n,r);return i.fatal=void 0,i}message(t,n,r){const i=new xn(t,n,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function t0(e,t){if(e&&e.includes(Gr.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Gr.sep+"`")}function n0(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function YC(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function nG(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const rG=function(e){const r=this.constructor.prototype,i=r[e],a=function(){return i.apply(a,arguments)};return Object.setPrototypeOf(a,r),a},iG={}.hasOwnProperty;class pS extends rG{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=VH()}copy(){const t=new pS;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(Jy(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(a0("data",this.frozen),this.namespace[t]=n,this):iG.call(this.namespace,t)&&this.namespace[t]||void 0:t?(a0("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const i=n.call(t,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=vd(t),r=this.parser||this.Parser;return r0("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),r0("process",this.parser||this.Parser),i0("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(a,o){const l=vd(t),c=r.parse(l);r.run(c,l,function(d,h,m){if(d||!h||!m)return f(d);const g=h,v=r.stringify(g,m);oG(v)?m.value=v:m.result=v,f(d,m)});function f(d,h){d||!h?o(d):a?a(h):n(void 0,h)}}}processSync(t){let n=!1,r;return this.freeze(),r0("processSync",this.parser||this.Parser),i0("processSync",this.compiler||this.Compiler),this.process(t,i),KC("processSync","process",n),r;function i(a,o){n=!0,HC(a),r=o}}run(t,n,r){ZC(t),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?a(void 0,r):new Promise(a);function a(o,l){const c=vd(n);i.run(t,c,f);function f(d,h,m){const g=h||t;d?l(d):o?o(g):r(void 0,g,m)}}}runSync(t,n){let r=!1,i;return this.run(t,n,a),KC("runSync","run",r),i;function a(o,l){HC(o),i=l,r=!0}}stringify(t,n){this.freeze();const r=vd(n),i=this.compiler||this.Compiler;return i0("stringify",i),ZC(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(a0("use",this.frozen),t!=null)if(typeof t=="function")c(t,n);else if(typeof t=="object")Array.isArray(t)?l(t):o(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function a(f){if(typeof f=="function")c(f,[]);else if(typeof f=="object")if(Array.isArray(f)){const[d,...h]=f;c(d,h)}else o(f);else throw new TypeError("Expected usable value, not `"+f+"`")}function o(f){if(!("plugins"in f)&&!("settings"in f))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");l(f.plugins),f.settings&&(i.settings=Jy(!0,i.settings,f.settings))}function l(f){let d=-1;if(f!=null)if(Array.isArray(f))for(;++d<f.length;){const h=f[d];a(h)}else throw new TypeError("Expected a list of plugins, not `"+f+"`")}function c(f,d){let h=-1,m=-1;for(;++h<r.length;)if(r[h][0]===f){m=h;break}if(m===-1)r.push([f,...d]);else if(d.length>0){let[g,...v]=d;const w=r[m][1];pw(w)&&pw(g)&&(g=Jy(!0,w,g)),r[m]=[f,g,...v]}}}}const aG=new pS().freeze();function r0(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function i0(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function a0(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function ZC(e){if(!pw(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function KC(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function vd(e){return sG(e)?e:new G3(e)}function sG(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function oG(e){return typeof e=="string"||lG(e)}function lG(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const uG="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",XC=[],WC={allowDangerousHtml:!0},cG=/^(https?|ircs?|mailto|xmpp)$/i,fG=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function Y3(e){const t=dG(e),n=hG(e);return pG(t.runSync(t.parse(n),n),e)}function dG(e){const t=e.rehypePlugins||XC,n=e.remarkPlugins||XC,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...WC}:WC;return aG().use(YV).use(n).use(FH,r).use(t)}function hG(e){const t=e.children||"",n=new G3;return typeof t=="string"&&(n.value=t),n}function pG(e,t){const n=t.allowedElements,r=t.allowElement,i=t.components,a=t.disallowedElements,o=t.skipHtml,l=t.unwrapDisallowed,c=t.urlTransform||mG;for(const d of fG)Object.hasOwn(t,d.from)&&(""+d.from+(d.to?"use `"+d.to+"` instead":"remove it")+uG+d.id,void 0);return hS(e,f),NB(e,{Fragment:N.Fragment,components:i,ignoreInvalidStyle:!0,jsx:N.jsx,jsxs:N.jsxs,passKeys:!0,passNode:!0});function f(d,h,m){if(d.type==="raw"&&m&&typeof h=="number")return o?m.children.splice(h,1):m.children[h]={type:"text",value:d.value},h;if(d.type==="element"){let g;for(g in Ky)if(Object.hasOwn(Ky,g)&&Object.hasOwn(d.properties,g)){const v=d.properties[g],w=Ky[g];(w===null||w.includes(d.tagName))&&(d.properties[g]=c(String(v||""),g,d))}}if(d.type==="element"){let g=n?!n.includes(d.tagName):a?a.includes(d.tagName):!1;if(!g&&r&&typeof h=="number"&&(g=!r(d,h,m)),g&&m&&typeof h=="number")return l&&d.children?m.children.splice(h,1,...d.children):m.children.splice(h,1),h}}}function mG(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||cG.test(e.slice(0,t))?e:""}function QC(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function gG(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function yG(e,t,n){const i=xp((n||{}).ignore||[]),a=bG(t);let o=-1;for(;++o<a.length;)H3(e,"text",l);function l(f,d){let h=-1,m;for(;++h<d.length;){const g=d[h],v=m?m.children:void 0;if(i(g,v?v.indexOf(g):void 0,m))return;m=g}if(m)return c(f,d)}function c(f,d){const h=d[d.length-1],m=a[o][0],g=a[o][1];let v=0;const b=h.children.indexOf(f);let _=!1,S=[];m.lastIndex=0;let x=m.exec(f.value);for(;x;){const A=x.index,k={index:x.index,input:x.input,stack:[...d,f]};let T=g(...x,k);if(typeof T=="string"&&(T=T.length>0?{type:"text",value:T}:void 0),T===!1?m.lastIndex=A+1:(v!==A&&S.push({type:"text",value:f.value.slice(v,A)}),Array.isArray(T)?S.push(...T):T&&S.push(T),v=A+x[0].length,_=!0),!m.global)break;x=m.exec(f.value)}return _?(v<f.value.length&&S.push({type:"text",value:f.value.slice(v)}),h.children.splice(b,1,...S)):S=[f],b+S.length}}function bG(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const i=n[r];t.push([vG(i[0]),_G(i[1])])}return t}function vG(e){return typeof e=="string"?new RegExp(gG(e),"g"):e}function _G(e){return typeof e=="function"?e:function(){return e}}const s0="phrasing",o0=["autolink","link","image","label"];function xG(){return{transforms:[CG],enter:{literalAutolink:SG,literalAutolinkEmail:l0,literalAutolinkHttp:l0,literalAutolinkWww:l0},exit:{literalAutolink:TG,literalAutolinkEmail:AG,literalAutolinkHttp:EG,literalAutolinkWww:kG}}}function wG(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:s0,notInConstruct:o0},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:s0,notInConstruct:o0},{character:":",before:"[ps]",after:"\\/",inConstruct:s0,notInConstruct:o0}]}}function SG(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function l0(e){this.config.enter.autolinkProtocol.call(this,e)}function EG(e){this.config.exit.autolinkProtocol.call(this,e)}function kG(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function AG(e){this.config.exit.autolinkEmail.call(this,e)}function TG(e){this.exit(e)}function CG(e){yG(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,OG],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),NG]],{ignore:["link","linkReference"]})}function OG(e,t,n,r,i){let a="";if(!Z3(i)||(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!RG(n)))return!1;const o=jG(n+r);if(!o[0])return!1;const l={type:"link",title:null,url:a+t+o[0],children:[{type:"text",value:t+o[0]}]};return o[1]?[l,{type:"text",value:o[1]}]:l}function NG(e,t,n,r){return!Z3(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function RG(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function jG(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const i=QC(e,"(");let a=QC(e,")");for(;r!==-1&&i>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),a++;return[e,n]}function Z3(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||_s(n)||bp(n))&&(!t||n!==47)}K3.peek=FG;function MG(){this.buffer()}function $G(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function DG(){this.buffer()}function IG(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function PG(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=$r(this.sliceSerialize(e)).toLowerCase(),n.label=t}function LG(e){this.exit(e)}function zG(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=$r(this.sliceSerialize(e)).toLowerCase(),n.label=t}function qG(e){this.exit(e)}function FG(){return"["}function K3(e,t,n,r){const i=n.createTracker(r);let a=i.move("[^");const o=n.enter("footnoteReference"),l=n.enter("reference");return a+=i.move(n.safe(n.associationId(e),{after:"]",before:a})),l(),o(),a+=i.move("]"),a}function BG(){return{enter:{gfmFootnoteCallString:MG,gfmFootnoteCall:$G,gfmFootnoteDefinitionLabelString:DG,gfmFootnoteDefinition:IG},exit:{gfmFootnoteCallString:PG,gfmFootnoteCall:LG,gfmFootnoteDefinitionLabelString:zG,gfmFootnoteDefinition:qG}}}function UG(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:K3},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,i,a,o){const l=a.createTracker(o);let c=l.move("[^");const f=a.enter("footnoteDefinition"),d=a.enter("label");return c+=l.move(a.safe(a.associationId(r),{before:c,after:"]"})),d(),c+=l.move("]:"),r.children&&r.children.length>0&&(l.shift(4),c+=l.move((t?`
|
|
75
|
+
`:" ")+a.indentLines(a.containerFlow(r,l.current()),t?X3:VG))),f(),c}}function VG(e,t,n){return t===0?e:X3(e,t,n)}function X3(e,t,n){return(n?"":" ")+e}const HG=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];W3.peek=XG;function GG(){return{canContainEols:["delete"],enter:{strikethrough:ZG},exit:{strikethrough:KG}}}function YG(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:HG}],handlers:{delete:W3}}}function ZG(e){this.enter({type:"delete",children:[]},e)}function KG(e){this.exit(e)}function W3(e,t,n,r){const i=n.createTracker(r),a=n.enter("strikethrough");let o=i.move("~~");return o+=n.containerPhrasing(e,{...i.current(),before:o,after:"~"}),o+=i.move("~~"),a(),o}function XG(){return"~"}function WG(e){return e.length}function QG(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||WG,a=[],o=[],l=[],c=[];let f=0,d=-1;for(;++d<e.length;){const w=[],b=[];let _=-1;for(e[d].length>f&&(f=e[d].length);++_<e[d].length;){const S=JG(e[d][_]);if(n.alignDelimiters!==!1){const x=i(S);b[_]=x,(c[_]===void 0||x>c[_])&&(c[_]=x)}w.push(S)}o[d]=w,l[d]=b}let h=-1;if(typeof r=="object"&&"length"in r)for(;++h<f;)a[h]=JC(r[h]);else{const w=JC(r);for(;++h<f;)a[h]=w}h=-1;const m=[],g=[];for(;++h<f;){const w=a[h];let b="",_="";w===99?(b=":",_=":"):w===108?b=":":w===114&&(_=":");let S=n.alignDelimiters===!1?1:Math.max(1,c[h]-b.length-_.length);const x=b+"-".repeat(S)+_;n.alignDelimiters!==!1&&(S=b.length+S+_.length,S>c[h]&&(c[h]=S),g[h]=S),m[h]=x}o.splice(1,0,m),l.splice(1,0,g),d=-1;const v=[];for(;++d<o.length;){const w=o[d],b=l[d];h=-1;const _=[];for(;++h<f;){const S=w[h]||"";let x="",A="";if(n.alignDelimiters!==!1){const k=c[h]-(b[h]||0),T=a[h];T===114?x=" ".repeat(k):T===99?k%2?(x=" ".repeat(k/2+.5),A=" ".repeat(k/2-.5)):(x=" ".repeat(k/2),A=x):A=" ".repeat(k)}n.delimiterStart!==!1&&!h&&_.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&S==="")&&(n.delimiterStart!==!1||h)&&_.push(" "),n.alignDelimiters!==!1&&_.push(x),_.push(S),n.alignDelimiters!==!1&&_.push(A),n.padding!==!1&&_.push(" "),(n.delimiterEnd!==!1||h!==f-1)&&_.push("|")}v.push(n.delimiterEnd===!1?_.join("").replace(/ +$/,""):_.join(""))}return v.join(`
|
|
76
|
+
`)}function JG(e){return e==null?"":String(e)}function JC(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function eY(e,t,n,r){const i=n.enter("blockquote"),a=n.createTracker(r);a.move("> "),a.shift(2);const o=n.indentLines(n.containerFlow(e,a.current()),tY);return i(),o}function tY(e,t,n){return">"+(n?"":" ")+e}function nY(e,t){return eO(e,t.inConstruct,!0)&&!eO(e,t.notInConstruct,!1)}function eO(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function tO(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
|
|
77
|
+
`&&nY(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
|
|
78
|
+
`}function rY(e,t){const n=String(e);let r=n.indexOf(t),i=r,a=0,o=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++a>o&&(o=a):a=1,i=r+t.length,r=n.indexOf(t,i);return o}function iY(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function aY(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function sY(e,t,n,r){const i=aY(n),a=e.value||"",o=i==="`"?"GraveAccent":"Tilde";if(iY(e,n)){const h=n.enter("codeIndented"),m=n.indentLines(a,oY);return h(),m}const l=n.createTracker(r),c=i.repeat(Math.max(rY(a,i)+1,3)),f=n.enter("codeFenced");let d=l.move(c);if(e.lang){const h=n.enter(`codeFencedLang${o}`);d+=l.move(n.safe(e.lang,{before:d,after:" ",encode:["`"],...l.current()})),h()}if(e.lang&&e.meta){const h=n.enter(`codeFencedMeta${o}`);d+=l.move(" "),d+=l.move(n.safe(e.meta,{before:d,after:`
|
|
79
|
+
`,encode:["`"],...l.current()})),h()}return d+=l.move(`
|
|
80
|
+
`),a&&(d+=l.move(a+`
|
|
81
|
+
`)),d+=l.move(c),f(),d}function oY(e,t,n){return(n?"":" ")+e}function mS(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function lY(e,t,n,r){const i=mS(n),a=i==='"'?"Quote":"Apostrophe",o=n.enter("definition");let l=n.enter("label");const c=n.createTracker(r);let f=c.move("[");return f+=c.move(n.safe(n.associationId(e),{before:f,after:"]",...c.current()})),f+=c.move("]: "),l(),!e.url||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),f+=c.move("<"),f+=c.move(n.safe(e.url,{before:f,after:">",...c.current()})),f+=c.move(">")):(l=n.enter("destinationRaw"),f+=c.move(n.safe(e.url,{before:f,after:e.title?" ":`
|
|
82
|
+
`,...c.current()}))),l(),e.title&&(l=n.enter(`title${a}`),f+=c.move(" "+i),f+=c.move(n.safe(e.title,{before:f,after:i,...c.current()})),f+=c.move(i),l()),o(),f}function uY(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function ic(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Hh(e,t,n){const r=Ho(e),i=Ho(t);return r===void 0?i===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}Q3.peek=cY;function Q3(e,t,n,r){const i=uY(n),a=n.enter("emphasis"),o=n.createTracker(r),l=o.move(i);let c=o.move(n.containerPhrasing(e,{after:i,before:l,...o.current()}));const f=c.charCodeAt(0),d=Hh(r.before.charCodeAt(r.before.length-1),f,i);d.inside&&(c=ic(f)+c.slice(1));const h=c.charCodeAt(c.length-1),m=Hh(r.after.charCodeAt(0),h,i);m.inside&&(c=c.slice(0,-1)+ic(h));const g=o.move(i);return a(),n.attentionEncodeSurroundingInfo={after:m.outside,before:d.outside},l+c+g}function cY(e,t,n){return n.options.emphasis||"*"}function fY(e,t){let n=!1;return hS(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,dw}),!!((!e.depth||e.depth<3)&&sS(e)&&(t.options.setext||n))}function dY(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(fY(e,n)){const d=n.enter("headingSetext"),h=n.enter("phrasing"),m=n.containerPhrasing(e,{...a.current(),before:`
|
|
83
|
+
`,after:`
|
|
84
|
+
`});return h(),d(),m+`
|
|
85
|
+
`+(i===1?"=":"-").repeat(m.length-(Math.max(m.lastIndexOf("\r"),m.lastIndexOf(`
|
|
86
|
+
`))+1))}const o="#".repeat(i),l=n.enter("headingAtx"),c=n.enter("phrasing");a.move(o+" ");let f=n.containerPhrasing(e,{before:"# ",after:`
|
|
87
|
+
`,...a.current()});return/^[\t ]/.test(f)&&(f=ic(f.charCodeAt(0))+f.slice(1)),f=f?o+" "+f:o,n.options.closeAtx&&(f+=" "+o),c(),l(),f}J3.peek=hY;function J3(e){return e.value||""}function hY(){return"<"}e5.peek=pY;function e5(e,t,n,r){const i=mS(n),a=i==='"'?"Quote":"Apostrophe",o=n.enter("image");let l=n.enter("label");const c=n.createTracker(r);let f=c.move("![");return f+=c.move(n.safe(e.alt,{before:f,after:"]",...c.current()})),f+=c.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),f+=c.move("<"),f+=c.move(n.safe(e.url,{before:f,after:">",...c.current()})),f+=c.move(">")):(l=n.enter("destinationRaw"),f+=c.move(n.safe(e.url,{before:f,after:e.title?" ":")",...c.current()}))),l(),e.title&&(l=n.enter(`title${a}`),f+=c.move(" "+i),f+=c.move(n.safe(e.title,{before:f,after:i,...c.current()})),f+=c.move(i),l()),f+=c.move(")"),o(),f}function pY(){return"!"}t5.peek=mY;function t5(e,t,n,r){const i=e.referenceType,a=n.enter("imageReference");let o=n.enter("label");const l=n.createTracker(r);let c=l.move("![");const f=n.safe(e.alt,{before:c,after:"]",...l.current()});c+=l.move(f+"]["),o();const d=n.stack;n.stack=[],o=n.enter("reference");const h=n.safe(n.associationId(e),{before:c,after:"]",...l.current()});return o(),n.stack=d,a(),i==="full"||!f||f!==h?c+=l.move(h+"]"):i==="shortcut"?c=c.slice(0,-1):c+=l.move("]"),c}function mY(){return"!"}n5.peek=gY;function n5(e,t,n){let r=e.value||"",i="`",a=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++a<n.unsafe.length;){const o=n.unsafe[a],l=n.compilePattern(o);let c;if(o.atBreak)for(;c=l.exec(r);){let f=c.index;r.charCodeAt(f)===10&&r.charCodeAt(f-1)===13&&f--,r=r.slice(0,f)+" "+r.slice(c.index+1)}}return i+r+i}function gY(){return"`"}function r5(e,t){const n=sS(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}i5.peek=yY;function i5(e,t,n,r){const i=mS(n),a=i==='"'?"Quote":"Apostrophe",o=n.createTracker(r);let l,c;if(r5(e,n)){const d=n.stack;n.stack=[],l=n.enter("autolink");let h=o.move("<");return h+=o.move(n.containerPhrasing(e,{before:h,after:">",...o.current()})),h+=o.move(">"),l(),n.stack=d,h}l=n.enter("link"),c=n.enter("label");let f=o.move("[");return f+=o.move(n.containerPhrasing(e,{before:f,after:"](",...o.current()})),f+=o.move("]("),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter("destinationLiteral"),f+=o.move("<"),f+=o.move(n.safe(e.url,{before:f,after:">",...o.current()})),f+=o.move(">")):(c=n.enter("destinationRaw"),f+=o.move(n.safe(e.url,{before:f,after:e.title?" ":")",...o.current()}))),c(),e.title&&(c=n.enter(`title${a}`),f+=o.move(" "+i),f+=o.move(n.safe(e.title,{before:f,after:i,...o.current()})),f+=o.move(i),c()),f+=o.move(")"),l(),f}function yY(e,t,n){return r5(e,n)?"<":"["}a5.peek=bY;function a5(e,t,n,r){const i=e.referenceType,a=n.enter("linkReference");let o=n.enter("label");const l=n.createTracker(r);let c=l.move("[");const f=n.containerPhrasing(e,{before:c,after:"]",...l.current()});c+=l.move(f+"]["),o();const d=n.stack;n.stack=[],o=n.enter("reference");const h=n.safe(n.associationId(e),{before:c,after:"]",...l.current()});return o(),n.stack=d,a(),i==="full"||!f||f!==h?c+=l.move(h+"]"):i==="shortcut"?c=c.slice(0,-1):c+=l.move("]"),c}function bY(){return"["}function gS(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function vY(e){const t=gS(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function _Y(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function s5(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function xY(e,t,n,r){const i=n.enter("list"),a=n.bulletCurrent;let o=e.ordered?_Y(n):gS(n);const l=e.ordered?o==="."?")":".":vY(n);let c=t&&n.bulletLastUsed?o===n.bulletLastUsed:!1;if(!e.ordered){const d=e.children?e.children[0]:void 0;if((o==="*"||o==="-")&&d&&(!d.children||!d.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(c=!0),s5(n)===o&&d){let h=-1;for(;++h<e.children.length;){const m=e.children[h];if(m&&m.type==="listItem"&&m.children&&m.children[0]&&m.children[0].type==="thematicBreak"){c=!0;break}}}}c&&(o=l),n.bulletCurrent=o;const f=n.containerFlow(e,r);return n.bulletLastUsed=o,n.bulletCurrent=a,i(),f}function wY(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function SY(e,t,n,r){const i=wY(n);let a=n.bulletCurrent||gS(n);t&&t.type==="list"&&t.ordered&&(a=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let o=a.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(o=Math.ceil(o/4)*4);const l=n.createTracker(r);l.move(a+" ".repeat(o-a.length)),l.shift(o);const c=n.enter("listItem"),f=n.indentLines(n.containerFlow(e,l.current()),d);return c(),f;function d(h,m,g){return m?(g?"":" ".repeat(o))+h:(g?a:a+" ".repeat(o-a.length))+h}}function EY(e,t,n,r){const i=n.enter("paragraph"),a=n.enter("phrasing"),o=n.containerPhrasing(e,r);return a(),i(),o}const kY=xp(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function AY(e,t,n,r){return(e.children.some(function(o){return kY(o)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function TY(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}o5.peek=CY;function o5(e,t,n,r){const i=TY(n),a=n.enter("strong"),o=n.createTracker(r),l=o.move(i+i);let c=o.move(n.containerPhrasing(e,{after:i,before:l,...o.current()}));const f=c.charCodeAt(0),d=Hh(r.before.charCodeAt(r.before.length-1),f,i);d.inside&&(c=ic(f)+c.slice(1));const h=c.charCodeAt(c.length-1),m=Hh(r.after.charCodeAt(0),h,i);m.inside&&(c=c.slice(0,-1)+ic(h));const g=o.move(i+i);return a(),n.attentionEncodeSurroundingInfo={after:m.outside,before:d.outside},l+c+g}function CY(e,t,n){return n.options.strong||"*"}function OY(e,t,n,r){return n.safe(e.value,r)}function NY(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function RY(e,t,n){const r=(s5(n)+(n.options.ruleSpaces?" ":"")).repeat(NY(n));return n.options.ruleSpaces?r.slice(0,-1):r}const l5={blockquote:eY,break:tO,code:sY,definition:lY,emphasis:Q3,hardBreak:tO,heading:dY,html:J3,image:e5,imageReference:t5,inlineCode:n5,link:i5,linkReference:a5,list:xY,listItem:SY,paragraph:EY,root:AY,strong:o5,text:OY,thematicBreak:RY};function jY(){return{enter:{table:MY,tableData:nO,tableHeader:nO,tableRow:DY},exit:{codeText:IY,table:$Y,tableData:u0,tableHeader:u0,tableRow:u0}}}function MY(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function $Y(e){this.exit(e),this.data.inTable=void 0}function DY(e){this.enter({type:"tableRow",children:[]},e)}function u0(e){this.exit(e)}function nO(e){this.enter({type:"tableCell",children:[]},e)}function IY(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,PY));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function PY(e,t){return t==="|"?t:e}function LY(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,a=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
88
|
+
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:m,table:o,tableCell:c,tableRow:l}};function o(g,v,w,b){return f(d(g,w,b),g.align)}function l(g,v,w,b){const _=h(g,w,b),S=f([_]);return S.slice(0,S.indexOf(`
|
|
89
|
+
`))}function c(g,v,w,b){const _=w.enter("tableCell"),S=w.enter("phrasing"),x=w.containerPhrasing(g,{...b,before:a,after:a});return S(),_(),x}function f(g,v){return QG(g,{align:v,alignDelimiters:r,padding:n,stringLength:i})}function d(g,v,w){const b=g.children;let _=-1;const S=[],x=v.enter("table");for(;++_<b.length;)S[_]=h(b[_],v,w);return x(),S}function h(g,v,w){const b=g.children;let _=-1;const S=[],x=v.enter("tableRow");for(;++_<b.length;)S[_]=c(b[_],g,v,w);return x(),S}function m(g,v,w){let b=l5.inlineCode(g,v,w);return w.stack.includes("tableCell")&&(b=b.replace(/\|/g,"\\$&")),b}}function zY(){return{exit:{taskListCheckValueChecked:rO,taskListCheckValueUnchecked:rO,paragraph:FY}}}function qY(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:BY}}}function rO(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function FY(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const i=t.children;let a=-1,o;for(;++a<i.length;){const l=i[a];if(l.type==="paragraph"){o=l;break}}o===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function BY(e,t,n,r){const i=e.children[0],a=typeof e.checked=="boolean"&&i&&i.type==="paragraph",o="["+(e.checked?"x":" ")+"] ",l=n.createTracker(r);a&&l.move(o);let c=l5.listItem(e,t,n,{...r,...l.current()});return a&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,f)),c;function f(d){return d+o}}function UY(){return[xG(),BG(),GG(),jY(),zY()]}function VY(e){return{extensions:[wG(),UG(e),YG(),LY(e),qY()]}}const HY={tokenize:WY,partial:!0},u5={tokenize:QY,partial:!0},c5={tokenize:JY,partial:!0},f5={tokenize:eZ,partial:!0},GY={tokenize:tZ,partial:!0},d5={name:"wwwAutolink",tokenize:KY,previous:p5},h5={name:"protocolAutolink",tokenize:XY,previous:m5},Li={name:"emailAutolink",tokenize:ZY,previous:g5},ei={};function YY(){return{text:ei}}let is=48;for(;is<123;)ei[is]=Li,is++,is===58?is=65:is===91&&(is=97);ei[43]=Li;ei[45]=Li;ei[46]=Li;ei[95]=Li;ei[72]=[Li,h5];ei[104]=[Li,h5];ei[87]=[Li,d5];ei[119]=[Li,d5];function ZY(e,t,n){const r=this;let i,a;return o;function o(h){return!gw(h)||!g5.call(r,r.previous)||yS(r.events)?n(h):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),l(h))}function l(h){return gw(h)?(e.consume(h),l):h===64?(e.consume(h),c):n(h)}function c(h){return h===46?e.check(GY,d,f)(h):h===45||h===95||_n(h)?(a=!0,e.consume(h),c):d(h)}function f(h){return e.consume(h),i=!0,c}function d(h){return a&&i&&Tn(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(h)):n(h)}}function KY(e,t,n){const r=this;return i;function i(o){return o!==87&&o!==119||!p5.call(r,r.previous)||yS(r.events)?n(o):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(HY,e.attempt(u5,e.attempt(c5,a),n),n)(o))}function a(o){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(o)}}function XY(e,t,n){const r=this;let i="",a=!1;return o;function o(h){return(h===72||h===104)&&m5.call(r,r.previous)&&!yS(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(h),e.consume(h),l):n(h)}function l(h){if(Tn(h)&&i.length<5)return i+=String.fromCodePoint(h),e.consume(h),l;if(h===58){const m=i.toLowerCase();if(m==="http"||m==="https")return e.consume(h),c}return n(h)}function c(h){return h===47?(e.consume(h),a?f:(a=!0,c)):n(h)}function f(h){return h===null||Bh(h)||Ct(h)||_s(h)||bp(h)?n(h):e.attempt(u5,e.attempt(c5,d),n)(h)}function d(h){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(h)}}function WY(e,t,n){let r=0;return i;function i(o){return(o===87||o===119)&&r<3?(r++,e.consume(o),i):o===46&&r===3?(e.consume(o),a):n(o)}function a(o){return o===null?n(o):t(o)}}function QY(e,t,n){let r,i,a;return o;function o(f){return f===46||f===95?e.check(f5,c,l)(f):f===null||Ct(f)||_s(f)||f!==45&&bp(f)?c(f):(a=!0,e.consume(f),o)}function l(f){return f===95?r=!0:(i=r,r=void 0),e.consume(f),o}function c(f){return i||r||!a?n(f):t(f)}}function JY(e,t){let n=0,r=0;return i;function i(o){return o===40?(n++,e.consume(o),i):o===41&&r<n?a(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?e.check(f5,t,a)(o):o===null||Ct(o)||_s(o)?t(o):(e.consume(o),i)}function a(o){return o===41&&r++,e.consume(o),i}}function eZ(e,t,n){return r;function r(l){return l===33||l===34||l===39||l===41||l===42||l===44||l===46||l===58||l===59||l===63||l===95||l===126?(e.consume(l),r):l===38?(e.consume(l),a):l===93?(e.consume(l),i):l===60||l===null||Ct(l)||_s(l)?t(l):n(l)}function i(l){return l===null||l===40||l===91||Ct(l)||_s(l)?t(l):r(l)}function a(l){return Tn(l)?o(l):n(l)}function o(l){return l===59?(e.consume(l),r):Tn(l)?(e.consume(l),o):n(l)}}function tZ(e,t,n){return r;function r(a){return e.consume(a),i}function i(a){return _n(a)?n(a):t(a)}}function p5(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Ct(e)}function m5(e){return!Tn(e)}function g5(e){return!(e===47||gw(e))}function gw(e){return e===43||e===45||e===46||e===95||_n(e)}function yS(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const nZ={tokenize:cZ,partial:!0};function rZ(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:oZ,continuation:{tokenize:lZ},exit:uZ}},text:{91:{name:"gfmFootnoteCall",tokenize:sZ},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:iZ,resolveTo:aZ}}}}function iZ(e,t,n){const r=this;let i=r.events.length;const a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o;for(;i--;){const c=r.events[i][1];if(c.type==="labelImage"){o=c;break}if(c.type==="gfmFootnoteCall"||c.type==="labelLink"||c.type==="label"||c.type==="image"||c.type==="link")break}return l;function l(c){if(!o||!o._balanced)return n(c);const f=$r(r.sliceSerialize({start:o.end,end:r.now()}));return f.codePointAt(0)!==94||!a.includes(f.slice(1))?n(c):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),t(c))}}function aZ(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const a={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},l=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",a,t],["enter",o,t],["exit",o,t],["exit",a,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...l),e}function sZ(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a=0,o;return l;function l(h){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(h),e.exit("gfmFootnoteCallLabelMarker"),c}function c(h){return h!==94?n(h):(e.enter("gfmFootnoteCallMarker"),e.consume(h),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",f)}function f(h){if(a>999||h===93&&!o||h===null||h===91||Ct(h))return n(h);if(h===93){e.exit("chunkString");const m=e.exit("gfmFootnoteCallString");return i.includes($r(r.sliceSerialize(m)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(h),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(h)}return Ct(h)||(o=!0),a++,e.consume(h),h===92?d:f}function d(h){return h===91||h===92||h===93?(e.consume(h),a++,f):f(h)}}function oZ(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a,o=0,l;return c;function c(v){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(v),e.exit("gfmFootnoteDefinitionLabelMarker"),f}function f(v){return v===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(v),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",d):n(v)}function d(v){if(o>999||v===93&&!l||v===null||v===91||Ct(v))return n(v);if(v===93){e.exit("chunkString");const w=e.exit("gfmFootnoteDefinitionLabelString");return a=$r(r.sliceSerialize(w)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(v),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),m}return Ct(v)||(l=!0),o++,e.consume(v),v===92?h:d}function h(v){return v===91||v===92||v===93?(e.consume(v),o++,d):d(v)}function m(v){return v===58?(e.enter("definitionMarker"),e.consume(v),e.exit("definitionMarker"),i.includes(a)||i.push(a),st(e,g,"gfmFootnoteDefinitionWhitespace")):n(v)}function g(v){return t(v)}}function lZ(e,t,n){return e.check(kc,t,e.attempt(nZ,t,n))}function uZ(e){e.exit("gfmFootnoteDefinition")}function cZ(e,t,n){const r=this;return st(e,i,"gfmFootnoteDefinitionIndent",5);function i(a){const o=r.events[r.events.length-1];return o&&o[1].type==="gfmFootnoteDefinitionIndent"&&o[2].sliceSerialize(o[1],!0).length===4?t(a):n(a)}}function fZ(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:a,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(o,l){let c=-1;for(;++c<o.length;)if(o[c][0]==="enter"&&o[c][1].type==="strikethroughSequenceTemporary"&&o[c][1]._close){let f=c;for(;f--;)if(o[f][0]==="exit"&&o[f][1].type==="strikethroughSequenceTemporary"&&o[f][1]._open&&o[c][1].end.offset-o[c][1].start.offset===o[f][1].end.offset-o[f][1].start.offset){o[c][1].type="strikethroughSequence",o[f][1].type="strikethroughSequence";const d={type:"strikethrough",start:Object.assign({},o[f][1].start),end:Object.assign({},o[c][1].end)},h={type:"strikethroughText",start:Object.assign({},o[f][1].end),end:Object.assign({},o[c][1].start)},m=[["enter",d,l],["enter",o[f][1],l],["exit",o[f][1],l],["enter",h,l]],g=l.parser.constructs.insideSpan.null;g&&ar(m,m.length,0,vp(g,o.slice(f+1,c),l)),ar(m,m.length,0,[["exit",h,l],["enter",o[c][1],l],["exit",o[c][1],l],["exit",d,l]]),ar(o,f-1,c-f+3,m),c=f+m.length-2;break}}for(c=-1;++c<o.length;)o[c][1].type==="strikethroughSequenceTemporary"&&(o[c][1].type="data");return o}function a(o,l,c){const f=this.previous,d=this.events;let h=0;return m;function m(v){return f===126&&d[d.length-1][1].type!=="characterEscape"?c(v):(o.enter("strikethroughSequenceTemporary"),g(v))}function g(v){const w=Ho(f);if(v===126)return h>1?c(v):(o.consume(v),h++,g);if(h<2&&!n)return c(v);const b=o.exit("strikethroughSequenceTemporary"),_=Ho(v);return b._open=!_||_===2&&!!w,b._close=!w||w===2&&!!_,l(v)}}}class dZ{constructor(){this.map=[]}add(t,n,r){hZ(this,t,n,r)}consume(t){if(this.map.sort(function(a,o){return a[0]-o[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let i=r.pop();for(;i;){for(const a of i)t.push(a);i=r.pop()}this.map.length=0}}function hZ(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function pZ(e,t){let n=!1;const r=[];for(;t<e.length;){const i=e[t];if(n){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const a=r.length-1;r[a]=r[a]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function mZ(){return{flow:{null:{name:"table",tokenize:gZ,resolveAll:yZ}}}}function gZ(e,t,n){const r=this;let i=0,a=0,o;return l;function l(M){let z=r.events.length-1;for(;z>-1;){const D=r.events[z][1].type;if(D==="lineEnding"||D==="linePrefix")z--;else break}const P=z>-1?r.events[z][1].type:null,q=P==="tableHead"||P==="tableRow"?T:c;return q===T&&r.parser.lazy[r.now().line]?n(M):q(M)}function c(M){return e.enter("tableHead"),e.enter("tableRow"),f(M)}function f(M){return M===124||(o=!0,a+=1),d(M)}function d(M){return M===null?n(M):Ie(M)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(M),e.exit("lineEnding"),g):n(M):nt(M)?st(e,d,"whitespace")(M):(a+=1,o&&(o=!1,i+=1),M===124?(e.enter("tableCellDivider"),e.consume(M),e.exit("tableCellDivider"),o=!0,d):(e.enter("data"),h(M)))}function h(M){return M===null||M===124||Ct(M)?(e.exit("data"),d(M)):(e.consume(M),M===92?m:h)}function m(M){return M===92||M===124?(e.consume(M),h):h(M)}function g(M){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(M):(e.enter("tableDelimiterRow"),o=!1,nt(M)?st(e,v,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(M):v(M))}function v(M){return M===45||M===58?b(M):M===124?(o=!0,e.enter("tableCellDivider"),e.consume(M),e.exit("tableCellDivider"),w):k(M)}function w(M){return nt(M)?st(e,b,"whitespace")(M):b(M)}function b(M){return M===58?(a+=1,o=!0,e.enter("tableDelimiterMarker"),e.consume(M),e.exit("tableDelimiterMarker"),_):M===45?(a+=1,_(M)):M===null||Ie(M)?A(M):k(M)}function _(M){return M===45?(e.enter("tableDelimiterFiller"),S(M)):k(M)}function S(M){return M===45?(e.consume(M),S):M===58?(o=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(M),e.exit("tableDelimiterMarker"),x):(e.exit("tableDelimiterFiller"),x(M))}function x(M){return nt(M)?st(e,A,"whitespace")(M):A(M)}function A(M){return M===124?v(M):M===null||Ie(M)?!o||i!==a?k(M):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(M)):k(M)}function k(M){return n(M)}function T(M){return e.enter("tableRow"),O(M)}function O(M){return M===124?(e.enter("tableCellDivider"),e.consume(M),e.exit("tableCellDivider"),O):M===null||Ie(M)?(e.exit("tableRow"),t(M)):nt(M)?st(e,O,"whitespace")(M):(e.enter("data"),$(M))}function $(M){return M===null||M===124||Ct(M)?(e.exit("data"),O(M)):(e.consume(M),M===92?L:$)}function L(M){return M===92||M===124?(e.consume(M),$):$(M)}}function yZ(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],o=[0,0,0,0],l=!1,c=0,f,d,h;const m=new dZ;for(;++n<e.length;){const g=e[n],v=g[1];g[0]==="enter"?v.type==="tableHead"?(l=!1,c!==0&&(iO(m,t,c,f,d),d=void 0,c=0),f={type:"table",start:Object.assign({},v.start),end:Object.assign({},v.end)},m.add(n,0,[["enter",f,t]])):v.type==="tableRow"||v.type==="tableDelimiterRow"?(r=!0,h=void 0,a=[0,0,0,0],o=[0,n+1,0,0],l&&(l=!1,d={type:"tableBody",start:Object.assign({},v.start),end:Object.assign({},v.end)},m.add(n,0,[["enter",d,t]])),i=v.type==="tableDelimiterRow"?2:d?3:1):i&&(v.type==="data"||v.type==="tableDelimiterMarker"||v.type==="tableDelimiterFiller")?(r=!1,o[2]===0&&(a[1]!==0&&(o[0]=o[1],h=_d(m,t,a,i,void 0,h),a=[0,0,0,0]),o[2]=n)):v.type==="tableCellDivider"&&(r?r=!1:(a[1]!==0&&(o[0]=o[1],h=_d(m,t,a,i,void 0,h)),a=o,o=[a[1],n,0,0])):v.type==="tableHead"?(l=!0,c=n):v.type==="tableRow"||v.type==="tableDelimiterRow"?(c=n,a[1]!==0?(o[0]=o[1],h=_d(m,t,a,i,n,h)):o[1]!==0&&(h=_d(m,t,o,i,n,h)),i=0):i&&(v.type==="data"||v.type==="tableDelimiterMarker"||v.type==="tableDelimiterFiller")&&(o[3]=n)}for(c!==0&&iO(m,t,c,f,d),m.consume(t.events),n=-1;++n<t.events.length;){const g=t.events[n];g[0]==="enter"&&g[1].type==="table"&&(g[1]._align=pZ(t.events,n))}return e}function _d(e,t,n,r,i,a){const o=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",l="tableContent";n[0]!==0&&(a.end=Object.assign({},jo(t.events,n[0])),e.add(n[0],0,[["exit",a,t]]));const c=jo(t.events,n[1]);if(a={type:o,start:Object.assign({},c),end:Object.assign({},c)},e.add(n[1],0,[["enter",a,t]]),n[2]!==0){const f=jo(t.events,n[2]),d=jo(t.events,n[3]),h={type:l,start:Object.assign({},f),end:Object.assign({},d)};if(e.add(n[2],0,[["enter",h,t]]),r!==2){const m=t.events[n[2]],g=t.events[n[3]];if(m[1].end=Object.assign({},g[1].end),m[1].type="chunkText",m[1].contentType="text",n[3]>n[2]+1){const v=n[2]+1,w=n[3]-n[2]-1;e.add(v,w,[])}}e.add(n[3]+1,0,[["exit",h,t]])}return i!==void 0&&(a.end=Object.assign({},jo(t.events,i)),e.add(i,0,[["exit",a,t]]),a=void 0),a}function iO(e,t,n,r,i){const a=[],o=jo(t.events,n);i&&(i.end=Object.assign({},o),a.push(["exit",i,t])),r.end=Object.assign({},o),a.push(["exit",r,t]),e.add(n+1,0,a)}function jo(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const bZ={name:"tasklistCheck",tokenize:_Z};function vZ(){return{text:{91:bZ}}}function _Z(e,t,n){const r=this;return i;function i(c){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(c):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(c),e.exit("taskListCheckMarker"),a)}function a(c){return Ct(c)?(e.enter("taskListCheckValueUnchecked"),e.consume(c),e.exit("taskListCheckValueUnchecked"),o):c===88||c===120?(e.enter("taskListCheckValueChecked"),e.consume(c),e.exit("taskListCheckValueChecked"),o):n(c)}function o(c){return c===93?(e.enter("taskListCheckMarker"),e.consume(c),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),l):n(c)}function l(c){return Ie(c)?t(c):nt(c)?e.check({tokenize:xZ},t,n)(c):n(c)}}function xZ(e,t,n){return st(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function wZ(e){return A3([YY(),rZ(),fZ(e),mZ(),vZ()])}const SZ={};function y5(e){const t=this,n=e||SZ,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),a=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),o=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(wZ(n)),a.push(UY()),o.push(VY(n))}const EZ=({message:e})=>N.jsx("div",{className:"flex flex-col w-[80%] bg-white rounded-lg shadow-sm border border-gray-200",children:N.jsxs("div",{className:"flex flex-col p-4",children:[N.jsx("div",{className:"text-sm font-medium text-gray-700 mb-2",children:e.name}),N.jsx("div",{className:"markdown-body max-w-none",children:N.jsx(Y3,{remarkPlugins:[y5],children:Fh(e.content)})}),N.jsx(Qw,{response_metadata:e.response_metadata,usage_metadata:e.usage_metadata||{},spend_time:e.spend_time,id:e.id})]})});function kZ(e){return"default"}function AZ(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"||e===null||Array.isArray(e)||typeof e=="object"?e:String(e)}const TZ=e=>({manageMemory:GT({name:"manage_memory",description:`这是一个**结构化**工具,用于**管理跨对话的持久化记忆**,以保留上下文、用户偏好和学习到的见解。它支持**创建、更新、检索和删除记忆条目**,从而在互动中保持连续性和个性化。
|
|
90
|
+
|
|
91
|
+
### 你需要记录记忆的场景
|
|
92
|
+
|
|
93
|
+
1. 请你第一时间敏锐记录下用户的细节偏好,包括对话风格、习惯、内容、方式等。
|
|
94
|
+
2. 记录下高价值的问答,比如用户对你的纠正、任务过程中的关键信息
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
### 核心功能
|
|
98
|
+
|
|
99
|
+
该工具具备以下关键能力:
|
|
100
|
+
|
|
101
|
+
* **记忆生命周期管理:** 对记忆条目进行**全生命周期管理**,包括创建、更新、检索和删除。
|
|
102
|
+
* **分段与标签支持:** 支持**分段或打标签的记忆条目**,方便分类和高效检索。
|
|
103
|
+
* **存储选项灵活:** 提供**临时和永久两种存储选项**,以适应不同类型信息的存储需求。
|
|
104
|
+
`,parameters:[{name:"path",type:"string",description:"记忆路径(创建时需要)"},{name:"tags",type:"string[]",description:"记忆标签(创建或更新时需要)"},{name:"content",type:"string",description:"记忆内容(创建或更新时需要)"},{name:"action",type:"string",enum:["create","update","delete"],description:"操作类型:create(创建)、update(更新)、delete(删除)"},{name:"id",type:"string",description:"记忆ID(更新或删除时需要,创建时会自动生成)",required:!1},{name:"referencePath",type:"string",description:"引用文档的 URL",required:!1}],handler:async t=>{const{content:n,action:r,id:i,tags:a,path:o,referencePath:l}=t;if((r==="delete"||r==="update")&&!i)throw new Error("删除或更新记忆时必须提供记忆ID");if((r==="create"||r==="update")&&!n)throw new Error("创建或更新记忆时必须提供内容");try{if(r==="delete")return await e.delete(Number(i)),`已删除记忆 ${i}`;const c={text:n,content:AZ(n),createdAt:new Date().toISOString(),updatedAt:new Date().toISOString(),namespace:kZ(),tags:a,path:o,type:"document",referencePath:l};return r==="create"?`已创建记忆 ${await e.insert(c)}`:(await e.update(Number(i),c),`已更新记忆 ${i}`)}catch(c){throw new Error(`记忆操作失败: ${c}`)}}}),searchMemory:GT({name:"search_memory",description:"搜索长期记忆中的相关信息,帮助维护对话上下文",parameters:[{name:"query",type:"string",description:"请使用中文关键词进行搜索"},{name:"tags",type:"string[]",description:"记忆标签",required:!1},{name:"path",type:"string",description:"记忆路径,memory://user_id/path/to/memory_name",required:!1},{name:"limit",type:"number",description:"返回结果的最大数量(默认10)",required:!1}],handler:async t=>{const{query:n,limit:r=10,tags:i,path:a}=t;if(!n||typeof n=="string"&&n.trim().length===0)throw new Error("搜索查询不能为空");try{const o=await e.query(n.toString(),{limit:r});return{query:n.toString(),results:o,total:o.length,limit:Number(r)}}catch(o){throw new Error(`搜索记忆失败: ${o}`)}}})}),yw=(e,t)=>t.some(n=>e instanceof n);let aO,sO;function CZ(){return aO||(aO=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function OZ(){return sO||(sO=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const bw=new WeakMap,c0=new WeakMap,Sp=new WeakMap;function NZ(e){const t=new Promise((n,r)=>{const i=()=>{e.removeEventListener("success",a),e.removeEventListener("error",o)},a=()=>{n(ms(e.result)),i()},o=()=>{r(e.error),i()};e.addEventListener("success",a),e.addEventListener("error",o)});return Sp.set(t,e),t}function RZ(e){if(bw.has(e))return;const t=new Promise((n,r)=>{const i=()=>{e.removeEventListener("complete",a),e.removeEventListener("error",o),e.removeEventListener("abort",o)},a=()=>{n(),i()},o=()=>{r(e.error||new DOMException("AbortError","AbortError")),i()};e.addEventListener("complete",a),e.addEventListener("error",o),e.addEventListener("abort",o)});bw.set(e,t)}let vw={get(e,t,n){if(e instanceof IDBTransaction){if(t==="done")return bw.get(e);if(t==="store")return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return ms(e[t])},set(e,t,n){return e[t]=n,!0},has(e,t){return e instanceof IDBTransaction&&(t==="done"||t==="store")?!0:t in e}};function b5(e){vw=e(vw)}function jZ(e){return OZ().includes(e)?function(...t){return e.apply(_w(this),t),ms(this.request)}:function(...t){return ms(e.apply(_w(this),t))}}function MZ(e){return typeof e=="function"?jZ(e):(e instanceof IDBTransaction&&RZ(e),yw(e,CZ())?new Proxy(e,vw):e)}function ms(e){if(e instanceof IDBRequest)return NZ(e);if(c0.has(e))return c0.get(e);const t=MZ(e);return t!==e&&(c0.set(e,t),Sp.set(t,e)),t}const _w=e=>Sp.get(e);function $Z(e,t,{blocked:n,upgrade:r,blocking:i,terminated:a}={}){const o=indexedDB.open(e,t),l=ms(o);return r&&o.addEventListener("upgradeneeded",c=>{r(ms(o.result),c.oldVersion,c.newVersion,ms(o.transaction),c)}),n&&o.addEventListener("blocked",c=>n(c.oldVersion,c.newVersion,c)),l.then(c=>{a&&c.addEventListener("close",()=>a()),i&&c.addEventListener("versionchange",f=>i(f.oldVersion,f.newVersion,f))}).catch(()=>{}),l}const DZ=["get","getKey","getAll","getAllKeys","count"],IZ=["put","add","delete","clear"],f0=new Map;function oO(e,t){if(!(e instanceof IDBDatabase&&!(t in e)&&typeof t=="string"))return;if(f0.get(t))return f0.get(t);const n=t.replace(/FromIndex$/,""),r=t!==n,i=IZ.includes(n);if(!(n in(r?IDBIndex:IDBObjectStore).prototype)||!(i||DZ.includes(n)))return;const a=async function(o,...l){const c=this.transaction(o,i?"readwrite":"readonly");let f=c.store;return r&&(f=f.index(l.shift())),(await Promise.all([f[n](...l),i&&c.done]))[0]};return f0.set(t,a),a}b5(e=>({...e,get:(t,n,r)=>oO(t,n)||e.get(t,n,r),has:(t,n)=>!!oO(t,n)||e.has(t,n)}));const PZ=["continue","continuePrimaryKey","advance"],lO={},xw=new WeakMap,v5=new WeakMap,LZ={get(e,t){if(!PZ.includes(t))return e[t];let n=lO[t];return n||(n=lO[t]=function(...r){xw.set(this,v5.get(this)[t](...r))}),n}};async function*zZ(...e){let t=this;if(t instanceof IDBCursor||(t=await t.openCursor(...e)),!t)return;t=t;const n=new Proxy(t,LZ);for(v5.set(n,t),Sp.set(n,_w(t));t;)yield n,t=await(xw.get(n)||t.continue()),xw.delete(n)}function uO(e,t){return t===Symbol.asyncIterator&&yw(e,[IDBIndex,IDBObjectStore,IDBCursor])||t==="iterate"&&yw(e,[IDBIndex,IDBObjectStore])}b5(e=>({...e,get(t,n,r){return uO(t,n)?zZ:e.get(t,n,r)},has(t,n){return uO(t,n)||e.has(t,n)}}));class qZ{constructor(t){De(this,"isInitialized",!1);De(this,"config");this.config=t}}const FZ="ENTRIES",_5="KEYS",x5="VALUES",gn="";class d0{constructor(t,n){const r=t._tree,i=Array.from(r.keys());this.set=t,this._type=n,this._path=i.length>0?[{node:r,keys:i}]:[]}next(){const t=this.dive();return this.backtrack(),t}dive(){if(this._path.length===0)return{done:!0,value:void 0};const{node:t,keys:n}=Ao(this._path);if(Ao(n)===gn)return{done:!1,value:this.result()};const r=t.get(Ao(n));return this._path.push({node:r,keys:Array.from(r.keys())}),this.dive()}backtrack(){if(this._path.length===0)return;const t=Ao(this._path).keys;t.pop(),!(t.length>0)&&(this._path.pop(),this.backtrack())}key(){return this.set._prefix+this._path.map(({keys:t})=>Ao(t)).filter(t=>t!==gn).join("")}value(){return Ao(this._path).node.get(gn)}result(){switch(this._type){case x5:return this.value();case _5:return this.key();default:return[this.key(),this.value()]}}[Symbol.iterator](){return this}}const Ao=e=>e[e.length-1],BZ=(e,t,n)=>{const r=new Map;if(t===void 0)return r;const i=t.length+1,a=i+n,o=new Uint8Array(a*i).fill(n+1);for(let l=0;l<i;++l)o[l]=l;for(let l=1;l<a;++l)o[l*i]=l;return w5(e,t,n,r,o,1,i,""),r},w5=(e,t,n,r,i,a,o,l)=>{const c=a*o;e:for(const f of e.keys())if(f===gn){const d=i[c-1];d<=n&&r.set(l,[e.get(f),d])}else{let d=a;for(let h=0;h<f.length;++h,++d){const m=f[h],g=o*d,v=g-o;let w=i[g];const b=Math.max(0,d-n-1),_=Math.min(o-1,d+n);for(let S=b;S<_;++S){const x=m!==t[S],A=i[v+S]+ +x,k=i[v+S+1]+1,T=i[g+S]+1,O=i[g+S+1]=Math.min(A,k,T);O<w&&(w=O)}if(w>n)continue e}w5(e.get(f),t,n,r,i,d,o,l+f)}};class Na{constructor(t=new Map,n=""){this._size=void 0,this._tree=t,this._prefix=n}atPrefix(t){if(!t.startsWith(this._prefix))throw new Error("Mismatched prefix");const[n,r]=Gh(this._tree,t.slice(this._prefix.length));if(n===void 0){const[i,a]=bS(r);for(const o of i.keys())if(o!==gn&&o.startsWith(a)){const l=new Map;return l.set(o.slice(a.length),i.get(o)),new Na(l,t)}}return new Na(n,t)}clear(){this._size=void 0,this._tree.clear()}delete(t){return this._size=void 0,UZ(this._tree,t)}entries(){return new d0(this,FZ)}forEach(t){for(const[n,r]of this)t(n,r,this)}fuzzyGet(t,n){return BZ(this._tree,t,n)}get(t){const n=ww(this._tree,t);return n!==void 0?n.get(gn):void 0}has(t){const n=ww(this._tree,t);return n!==void 0&&n.has(gn)}keys(){return new d0(this,_5)}set(t,n){if(typeof t!="string")throw new Error("key must be a string");return this._size=void 0,h0(this._tree,t).set(gn,n),this}get size(){if(this._size)return this._size;this._size=0;const t=this.entries();for(;!t.next().done;)this._size+=1;return this._size}update(t,n){if(typeof t!="string")throw new Error("key must be a string");this._size=void 0;const r=h0(this._tree,t);return r.set(gn,n(r.get(gn))),this}fetch(t,n){if(typeof t!="string")throw new Error("key must be a string");this._size=void 0;const r=h0(this._tree,t);let i=r.get(gn);return i===void 0&&r.set(gn,i=n()),i}values(){return new d0(this,x5)}[Symbol.iterator](){return this.entries()}static from(t){const n=new Na;for(const[r,i]of t)n.set(r,i);return n}static fromObject(t){return Na.from(Object.entries(t))}}const Gh=(e,t,n=[])=>{if(t.length===0||e==null)return[e,n];for(const r of e.keys())if(r!==gn&&t.startsWith(r))return n.push([e,r]),Gh(e.get(r),t.slice(r.length),n);return n.push([e,t]),Gh(void 0,"",n)},ww=(e,t)=>{if(t.length===0||e==null)return e;for(const n of e.keys())if(n!==gn&&t.startsWith(n))return ww(e.get(n),t.slice(n.length))},h0=(e,t)=>{const n=t.length;e:for(let r=0;e&&r<n;){for(const a of e.keys())if(a!==gn&&t[r]===a[0]){const o=Math.min(n-r,a.length);let l=1;for(;l<o&&t[r+l]===a[l];)++l;const c=e.get(a);if(l===a.length)e=c;else{const f=new Map;f.set(a.slice(l),c),e.set(t.slice(r,r+l),f),e.delete(a),e=f}r+=l;continue e}const i=new Map;return e.set(t.slice(r),i),i}return e},UZ=(e,t)=>{const[n,r]=Gh(e,t);if(n!==void 0){if(n.delete(gn),n.size===0)S5(r);else if(n.size===1){const[i,a]=n.entries().next().value;E5(r,i,a)}}},S5=e=>{if(e.length===0)return;const[t,n]=bS(e);if(t.delete(n),t.size===0)S5(e.slice(0,-1));else if(t.size===1){const[r,i]=t.entries().next().value;r!==gn&&E5(e.slice(0,-1),r,i)}},E5=(e,t,n)=>{if(e.length===0)return;const[r,i]=bS(e);r.set(i+t,n),r.delete(i)},bS=e=>e[e.length-1],vS="or",k5="and",VZ="and_not";class gs{constructor(t){if((t==null?void 0:t.fields)==null)throw new Error('MiniSearch: option "fields" must be provided');const n=t.autoVacuum==null||t.autoVacuum===!0?g0:t.autoVacuum;this._options={...m0,...t,autoVacuum:n,searchOptions:{...cO,...t.searchOptions||{}},autoSuggestOptions:{...KZ,...t.autoSuggestOptions||{}}},this._index=new Na,this._documentCount=0,this._documentIds=new Map,this._idToShortId=new Map,this._fieldIds={},this._fieldLength=new Map,this._avgFieldLength=[],this._nextId=0,this._storedFields=new Map,this._dirtCount=0,this._currentVacuum=null,this._enqueuedVacuum=null,this._enqueuedVacuumConditions=Ew,this.addFields(this._options.fields)}add(t){const{extractField:n,tokenize:r,processTerm:i,fields:a,idField:o}=this._options,l=n(t,o);if(l==null)throw new Error(`MiniSearch: document does not have ID field "${o}"`);if(this._idToShortId.has(l))throw new Error(`MiniSearch: duplicate ID ${l}`);const c=this.addDocumentId(l);this.saveStoredFields(c,t);for(const f of a){const d=n(t,f);if(d==null)continue;const h=r(d.toString(),f),m=this._fieldIds[f],g=new Set(h).size;this.addFieldLength(c,m,this._documentCount-1,g);for(const v of h){const w=i(v,f);if(Array.isArray(w))for(const b of w)this.addTerm(m,c,b);else w&&this.addTerm(m,c,w)}}}addAll(t){for(const n of t)this.add(n)}addAllAsync(t,n={}){const{chunkSize:r=10}=n,i={chunk:[],promise:Promise.resolve()},{chunk:a,promise:o}=t.reduce(({chunk:l,promise:c},f,d)=>(l.push(f),(d+1)%r===0?{chunk:[],promise:c.then(()=>new Promise(h=>setTimeout(h,0))).then(()=>this.addAll(l))}:{chunk:l,promise:c}),i);return o.then(()=>this.addAll(a))}remove(t){const{tokenize:n,processTerm:r,extractField:i,fields:a,idField:o}=this._options,l=i(t,o);if(l==null)throw new Error(`MiniSearch: document does not have ID field "${o}"`);const c=this._idToShortId.get(l);if(c==null)throw new Error(`MiniSearch: cannot remove document with ID ${l}: it is not in the index`);for(const f of a){const d=i(t,f);if(d==null)continue;const h=n(d.toString(),f),m=this._fieldIds[f],g=new Set(h).size;this.removeFieldLength(c,m,this._documentCount,g);for(const v of h){const w=r(v,f);if(Array.isArray(w))for(const b of w)this.removeTerm(m,c,b);else w&&this.removeTerm(m,c,w)}}this._storedFields.delete(c),this._documentIds.delete(c),this._idToShortId.delete(l),this._fieldLength.delete(c),this._documentCount-=1}removeAll(t){if(t)for(const n of t)this.remove(n);else{if(arguments.length>0)throw new Error("Expected documents to be present. Omit the argument to remove all documents.");this._index=new Na,this._documentCount=0,this._documentIds=new Map,this._idToShortId=new Map,this._fieldLength=new Map,this._avgFieldLength=[],this._storedFields=new Map,this._nextId=0}}discard(t){const n=this._idToShortId.get(t);if(n==null)throw new Error(`MiniSearch: cannot discard document with ID ${t}: it is not in the index`);this._idToShortId.delete(t),this._documentIds.delete(n),this._storedFields.delete(n),(this._fieldLength.get(n)||[]).forEach((r,i)=>{this.removeFieldLength(n,i,this._documentCount,r)}),this._fieldLength.delete(n),this._documentCount-=1,this._dirtCount+=1,this.maybeAutoVacuum()}maybeAutoVacuum(){if(this._options.autoVacuum===!1)return;const{minDirtFactor:t,minDirtCount:n,batchSize:r,batchWait:i}=this._options.autoVacuum;this.conditionalVacuum({batchSize:r,batchWait:i},{minDirtCount:n,minDirtFactor:t})}discardAll(t){const n=this._options.autoVacuum;try{this._options.autoVacuum=!1;for(const r of t)this.discard(r)}finally{this._options.autoVacuum=n}this.maybeAutoVacuum()}replace(t){const{idField:n,extractField:r}=this._options,i=r(t,n);this.discard(i),this.add(t)}vacuum(t={}){return this.conditionalVacuum(t)}conditionalVacuum(t,n){return this._currentVacuum?(this._enqueuedVacuumConditions=this._enqueuedVacuumConditions&&n,this._enqueuedVacuum!=null?this._enqueuedVacuum:(this._enqueuedVacuum=this._currentVacuum.then(()=>{const r=this._enqueuedVacuumConditions;return this._enqueuedVacuumConditions=Ew,this.performVacuuming(t,r)}),this._enqueuedVacuum)):this.vacuumConditionsMet(n)===!1?Promise.resolve():(this._currentVacuum=this.performVacuuming(t),this._currentVacuum)}async performVacuuming(t,n){const r=this._dirtCount;if(this.vacuumConditionsMet(n)){const i=t.batchSize||Sw.batchSize,a=t.batchWait||Sw.batchWait;let o=1;for(const[l,c]of this._index){for(const[f,d]of c)for(const[h]of d)this._documentIds.has(h)||(d.size<=1?c.delete(f):d.delete(h));this._index.get(l).size===0&&this._index.delete(l),o%i===0&&await new Promise(f=>setTimeout(f,a)),o+=1}this._dirtCount-=r}await null,this._currentVacuum=this._enqueuedVacuum,this._enqueuedVacuum=null}vacuumConditionsMet(t){if(t==null)return!0;let{minDirtCount:n,minDirtFactor:r}=t;return n=n||g0.minDirtCount,r=r||g0.minDirtFactor,this.dirtCount>=n&&this.dirtFactor>=r}get isVacuuming(){return this._currentVacuum!=null}get dirtCount(){return this._dirtCount}get dirtFactor(){return this._dirtCount/(1+this._documentCount+this._dirtCount)}has(t){return this._idToShortId.has(t)}getStoredFields(t){const n=this._idToShortId.get(t);if(n!=null)return this._storedFields.get(n)}search(t,n={}){const{searchOptions:r}=this._options,i={...r,...n},a=this.executeQuery(t,n),o=[];for(const[l,{score:c,terms:f,match:d}]of a){const h=f.length||1,m={id:this._documentIds.get(l),score:c*h,terms:Object.keys(d),queryTerms:f,match:d};Object.assign(m,this._storedFields.get(l)),(i.filter==null||i.filter(m))&&o.push(m)}return t===gs.wildcard&&i.boostDocument==null||o.sort(dO),o}autoSuggest(t,n={}){n={...this._options.autoSuggestOptions,...n};const r=new Map;for(const{score:a,terms:o}of this.search(t,n)){const l=o.join(" "),c=r.get(l);c!=null?(c.score+=a,c.count+=1):r.set(l,{score:a,terms:o,count:1})}const i=[];for(const[a,{score:o,terms:l,count:c}]of r)i.push({suggestion:a,terms:l,score:o/c});return i.sort(dO),i}get documentCount(){return this._documentCount}get termCount(){return this._index.size}static loadJSON(t,n){if(n==null)throw new Error("MiniSearch: loadJSON should be given the same options used when serializing the index");return this.loadJS(JSON.parse(t),n)}static async loadJSONAsync(t,n){if(n==null)throw new Error("MiniSearch: loadJSON should be given the same options used when serializing the index");return this.loadJSAsync(JSON.parse(t),n)}static getDefault(t){if(m0.hasOwnProperty(t))return p0(m0,t);throw new Error(`MiniSearch: unknown option "${t}"`)}static loadJS(t,n){const{index:r,documentIds:i,fieldLength:a,storedFields:o,serializationVersion:l}=t,c=this.instantiateMiniSearch(t,n);c._documentIds=xd(i),c._fieldLength=xd(a),c._storedFields=xd(o);for(const[f,d]of c._documentIds)c._idToShortId.set(d,f);for(const[f,d]of r){const h=new Map;for(const m of Object.keys(d)){let g=d[m];l===1&&(g=g.ds),h.set(parseInt(m,10),xd(g))}c._index.set(f,h)}return c}static async loadJSAsync(t,n){const{index:r,documentIds:i,fieldLength:a,storedFields:o,serializationVersion:l}=t,c=this.instantiateMiniSearch(t,n);c._documentIds=await wd(i),c._fieldLength=await wd(a),c._storedFields=await wd(o);for(const[d,h]of c._documentIds)c._idToShortId.set(h,d);let f=0;for(const[d,h]of r){const m=new Map;for(const g of Object.keys(h)){let v=h[g];l===1&&(v=v.ds),m.set(parseInt(g,10),await wd(v))}++f%1e3===0&&await A5(0),c._index.set(d,m)}return c}static instantiateMiniSearch(t,n){const{documentCount:r,nextId:i,fieldIds:a,averageFieldLength:o,dirtCount:l,serializationVersion:c}=t;if(c!==1&&c!==2)throw new Error("MiniSearch: cannot deserialize an index created with an incompatible version");const f=new gs(n);return f._documentCount=r,f._nextId=i,f._idToShortId=new Map,f._fieldIds=a,f._avgFieldLength=o,f._dirtCount=l||0,f._index=new Na,f}executeQuery(t,n={}){if(t===gs.wildcard)return this.executeWildcardQuery(n);if(typeof t!="string"){const m={...n,...t,queries:void 0},g=t.queries.map(v=>this.executeQuery(v,m));return this.combineResults(g,m.combineWith)}const{tokenize:r,processTerm:i,searchOptions:a}=this._options,o={tokenize:r,processTerm:i,...a,...n},{tokenize:l,processTerm:c}=o,h=l(t).flatMap(m=>c(m)).filter(m=>!!m).map(ZZ(o)).map(m=>this.executeQuerySpec(m,o));return this.combineResults(h,o.combineWith)}executeQuerySpec(t,n){const r={...this._options.searchOptions,...n},i=(r.fields||this._options.fields).reduce((w,b)=>({...w,[b]:p0(r.boost,b)||1}),{}),{boostDocument:a,weights:o,maxFuzzy:l,bm25:c}=r,{fuzzy:f,prefix:d}={...cO.weights,...o},h=this._index.get(t.term),m=this.termResults(t.term,t.term,1,t.termBoost,h,i,a,c);let g,v;if(t.prefix&&(g=this._index.atPrefix(t.term)),t.fuzzy){const w=t.fuzzy===!0?.2:t.fuzzy,b=w<1?Math.min(l,Math.round(t.term.length*w)):w;b&&(v=this._index.fuzzyGet(t.term,b))}if(g)for(const[w,b]of g){const _=w.length-t.term.length;if(!_)continue;v==null||v.delete(w);const S=d*w.length/(w.length+.3*_);this.termResults(t.term,w,S,t.termBoost,b,i,a,c,m)}if(v)for(const w of v.keys()){const[b,_]=v.get(w);if(!_)continue;const S=f*w.length/(w.length+_);this.termResults(t.term,w,S,t.termBoost,b,i,a,c,m)}return m}executeWildcardQuery(t){const n=new Map,r={...this._options.searchOptions,...t};for(const[i,a]of this._documentIds){const o=r.boostDocument?r.boostDocument(a,"",this._storedFields.get(i)):1;n.set(i,{score:o,terms:[],match:{}})}return n}combineResults(t,n=vS){if(t.length===0)return new Map;const r=n.toLowerCase(),i=HZ[r];if(!i)throw new Error(`Invalid combination operator: ${n}`);return t.reduce(i)||new Map}toJSON(){const t=[];for(const[n,r]of this._index){const i={};for(const[a,o]of r)i[a]=Object.fromEntries(o);t.push([n,i])}return{documentCount:this._documentCount,nextId:this._nextId,documentIds:Object.fromEntries(this._documentIds),fieldIds:this._fieldIds,fieldLength:Object.fromEntries(this._fieldLength),averageFieldLength:this._avgFieldLength,storedFields:Object.fromEntries(this._storedFields),dirtCount:this._dirtCount,index:t,serializationVersion:2}}termResults(t,n,r,i,a,o,l,c,f=new Map){if(a==null)return f;for(const d of Object.keys(o)){const h=o[d],m=this._fieldIds[d],g=a.get(m);if(g==null)continue;let v=g.size;const w=this._avgFieldLength[m];for(const b of g.keys()){if(!this._documentIds.has(b)){this.removeTerm(m,b,n),v-=1;continue}const _=l?l(this._documentIds.get(b),n,this._storedFields.get(b)):1;if(!_)continue;const S=g.get(b),x=this._fieldLength.get(b)[m],A=YZ(S,v,this._documentCount,x,w,c),k=r*i*h*_*A,T=f.get(b);if(T){T.score+=k,XZ(T.terms,t);const O=p0(T.match,n);O?O.push(d):T.match[n]=[d]}else f.set(b,{score:k,terms:[t],match:{[n]:[d]}})}}return f}addTerm(t,n,r){const i=this._index.fetch(r,hO);let a=i.get(t);if(a==null)a=new Map,a.set(n,1),i.set(t,a);else{const o=a.get(n);a.set(n,(o||0)+1)}}removeTerm(t,n,r){if(!this._index.has(r)){this.warnDocumentChanged(n,t,r);return}const i=this._index.fetch(r,hO),a=i.get(t);a==null||a.get(n)==null?this.warnDocumentChanged(n,t,r):a.get(n)<=1?a.size<=1?i.delete(t):a.delete(n):a.set(n,a.get(n)-1),this._index.get(r).size===0&&this._index.delete(r)}warnDocumentChanged(t,n,r){for(const i of Object.keys(this._fieldIds))if(this._fieldIds[i]===n){this._options.logger("warn",`MiniSearch: document with ID ${this._documentIds.get(t)} has changed before removal: term "${r}" was not present in field "${i}". Removing a document after it has changed can corrupt the index!`,"version_conflict");return}}addDocumentId(t){const n=this._nextId;return this._idToShortId.set(t,n),this._documentIds.set(n,t),this._documentCount+=1,this._nextId+=1,n}addFields(t){for(let n=0;n<t.length;n++)this._fieldIds[t[n]]=n}addFieldLength(t,n,r,i){let a=this._fieldLength.get(t);a==null&&this._fieldLength.set(t,a=[]),a[n]=i;const l=(this._avgFieldLength[n]||0)*r+i;this._avgFieldLength[n]=l/(r+1)}removeFieldLength(t,n,r,i){if(r===1){this._avgFieldLength[n]=0;return}const a=this._avgFieldLength[n]*r-i;this._avgFieldLength[n]=a/(r-1)}saveStoredFields(t,n){const{storeFields:r,extractField:i}=this._options;if(r==null||r.length===0)return;let a=this._storedFields.get(t);a==null&&this._storedFields.set(t,a={});for(const o of r){const l=i(n,o);l!==void 0&&(a[o]=l)}}}gs.wildcard=Symbol("*");const p0=(e,t)=>Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0,HZ={[vS]:(e,t)=>{for(const n of t.keys()){const r=e.get(n);if(r==null)e.set(n,t.get(n));else{const{score:i,terms:a,match:o}=t.get(n);r.score=r.score+i,r.match=Object.assign(r.match,o),fO(r.terms,a)}}return e},[k5]:(e,t)=>{const n=new Map;for(const r of t.keys()){const i=e.get(r);if(i==null)continue;const{score:a,terms:o,match:l}=t.get(r);fO(i.terms,o),n.set(r,{score:i.score+a,terms:i.terms,match:Object.assign(i.match,l)})}return n},[VZ]:(e,t)=>{for(const n of t.keys())e.delete(n);return e}},GZ={k:1.2,b:.7,d:.5},YZ=(e,t,n,r,i,a)=>{const{k:o,b:l,d:c}=a;return Math.log(1+(n-t+.5)/(t+.5))*(c+e*(o+1)/(e+o*(1-l+l*r/i)))},ZZ=e=>(t,n,r)=>{const i=typeof e.fuzzy=="function"?e.fuzzy(t,n,r):e.fuzzy||!1,a=typeof e.prefix=="function"?e.prefix(t,n,r):e.prefix===!0,o=typeof e.boostTerm=="function"?e.boostTerm(t,n,r):1;return{term:t,fuzzy:i,prefix:a,termBoost:o}},m0={idField:"id",extractField:(e,t)=>e[t],tokenize:e=>e.split(WZ),processTerm:e=>e.toLowerCase(),fields:void 0,searchOptions:void 0,storeFields:[],logger:(e,t)=>{typeof(console==null?void 0:console[e])=="function"&&console[e](t)},autoVacuum:!0},cO={combineWith:vS,prefix:!1,fuzzy:!1,maxFuzzy:6,boost:{},weights:{fuzzy:.45,prefix:.375},bm25:GZ},KZ={combineWith:k5,prefix:(e,t,n)=>t===n.length-1},Sw={batchSize:1e3,batchWait:10},Ew={minDirtFactor:.1,minDirtCount:20},g0={...Sw,...Ew},XZ=(e,t)=>{e.includes(t)||e.push(t)},fO=(e,t)=>{for(const n of t)e.includes(n)||e.push(n)},dO=({score:e},{score:t})=>t-e,hO=()=>new Map,xd=e=>{const t=new Map;for(const n of Object.keys(e))t.set(parseInt(n,10),e[n]);return t},wd=async e=>{const t=new Map;let n=0;for(const r of Object.keys(e))t.set(parseInt(r,10),e[r]),++n%1e3===0&&await A5(0);return t},A5=e=>new Promise(t=>setTimeout(t,e)),WZ=/[\n\r\p{Z}\p{P}]+/u,pO={dbName:"minisearch_memory_db",dbVersion:1,storeName:"memory",miniSearchOptions:{fields:["text","path","tags","referencePath"],storeFields:["text","path","tags","referencePath"],tokenize:T5}};function T5(e){const t=e.replace(/ /g,""),n=new Intl.Segmenter("zh-CN",{granularity:"word"});return Array.from(n.segment(t)).map(i=>i.segment)}class QZ extends qZ{constructor(n){const r={...pO,...n,miniSearchOptions:{...pO.miniSearchOptions,...(n==null?void 0:n.miniSearchOptions)||{}}};super(r);De(this,"miniSearch");De(this,"config");De(this,"db");this.config=r}async initialize(){if(this.isInitialized)return;const{storeName:n}=this.config;this.db=await $Z(this.config.dbName,this.config.dbVersion,{upgrade(i){i.objectStoreNames.contains(n)||i.createObjectStore(n,{keyPath:"id",autoIncrement:!0}),i.objectStoreNames.contains("minisearch_index")||i.createObjectStore("minisearch_index")}});const r={fields:this.config.miniSearchOptions.fields||["text"],storeFields:this.config.miniSearchOptions.storeFields||["text"],tokenize:this.config.miniSearchOptions.tokenize||T5};this.miniSearch=new gs(r);try{const i=await this.loadMiniSearchIndex();if(i)console.log(i),this.miniSearch=await gs.loadJSAsync(i,r),console.log("MiniSearch index loaded from IndexedDB.");else{console.log("No saved index found, building from documents...");const a=await this.getAll();a.length>0?(this.miniSearch.addAll(a),await this.saveMiniSearchIndex(this.miniSearch.toJSON()),console.log(`MiniSearch index built from ${a.length} documents and saved.`)):console.log("No documents found, index is empty.")}this.isInitialized=!0}catch(i){throw console.error("Failed to initialize FullTextSearchService:",i),i}}async insert(n){const r=this.db.transaction(this.config.storeName,"readwrite"),i=r.objectStore(this.config.storeName),a={...n},o=await i.add(a);return a.id=Number(o),await r.done,this.miniSearch.add(a),await this.saveMiniSearchIndex(this.miniSearch.toJSON()),a.id}async update(n,r){const a=this.db.transaction(this.config.storeName,"readwrite").objectStore(this.config.storeName),o={...r,id:n};await a.put(o);const l=await a.get(n);l&&this.miniSearch.remove(l),this.miniSearch.add(o),await this.saveMiniSearchIndex(this.miniSearch.toJSON())}async delete(n){const i=this.db.transaction(this.config.storeName,"readwrite").objectStore(this.config.storeName),a=await i.get(n);a&&this.miniSearch.remove(a),await i.delete(n),await this.saveMiniSearchIndex(this.miniSearch.toJSON())}async query(n,r){return this.miniSearch.search(n,r).slice(0,(r==null?void 0:r.limit)??5).map(a=>{const{id:o,text:l,...c}=a;return{id:o,text:l,tags:c.tags,path:c.path,type:c.type,score:Math.round(a.score),referencePath:c.referencePath}})}async get(n){return this.db.transaction(this.config.storeName,"readonly").objectStore(this.config.storeName).get(n)}async getAll(){return this.db.transaction(this.config.storeName,"readonly").objectStore(this.config.storeName).getAll()}async loadMiniSearchIndex(){return this.db.transaction("minisearch_index","readonly").objectStore("minisearch_index").get("indexData")}async saveMiniSearchIndex(n){const r=this.db.transaction("minisearch_index","readwrite");await r.objectStore("minisearch_index").put(n,"indexData"),await r.done}}const JZ=localStorage.getItem("withCredentials")==="true"?(e,t)=>(t.credentials="include",fetch(e,t)):fetch,eK=()=>({showHistory:localStorage.getItem("showHistory")==="true"||!1,showGraph:localStorage.getItem("showGraph")==="true"||!1}),mO=e=>{Object.entries(e).forEach(([t,n])=>{localStorage.setItem(t,n.toString())})},_S=new QZ({dbName:"memory_fulltext_db",dbVersion:1,storeName:"memory"});_S.initialize();console.log(_S);TZ(_S);const tK=t7(localStorage.getItem("agent_name")||"",{apiUrl:localStorage.getItem("apiUrl")||"http://localhost:8123",defaultHeaders:JSON.parse(localStorage.getItem("code")||"{}"),callerOptions:{fetch:JZ}},{...eK()});let y0=(e,t)=>n=>{e.current!==n&&(e.current=n,t())};function nK(e,{keys:t,deps:n=[e,t]}={}){let r=te.useRef();r.current=e.get();let i=te.useCallback(o=>(y0(r,o)(e.value),(t==null?void 0:t.length)>0?GF(e,t,y0(r,o)):e.listen(y0(r,o))),n),a=()=>r.current;return te.useSyncExternalStore(i,a,a)}const C5=te.createContext(void 0),Ts=()=>{const e=te.useContext(C5);if(!e)throw new Error("useChat must be used within a ChatProvider");return e},rK=({children:e})=>{const t=tB(tK,nK);return te.useEffect(()=>{t.initClient().then(n=>{t.showHistory&&t.refreshHistoryList(),console.log(n)}).catch(n=>{console.error(n);const r=prompt("Failed to initialize chat client: "+t.currentAgent+`
|
|
105
|
+
请输入 agent 名称`);localStorage.setItem("agent_name",r),location.reload()})},[]),N.jsx(C5.Provider,{value:t,children:e})};function O5(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=O5(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function N5(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=O5(e))&&(r&&(r+=" "),r+=t);return r}var iK=Object.create,Ep=Object.defineProperty,aK=Object.defineProperties,sK=Object.getOwnPropertyDescriptor,oK=Object.getOwnPropertyDescriptors,R5=Object.getOwnPropertyNames,Yh=Object.getOwnPropertySymbols,lK=Object.getPrototypeOf,xS=Object.prototype.hasOwnProperty,j5=Object.prototype.propertyIsEnumerable,gO=(e,t,n)=>t in e?Ep(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Xr=(e,t)=>{for(var n in t||(t={}))xS.call(t,n)&&gO(e,n,t[n]);if(Yh)for(var n of Yh(t))j5.call(t,n)&&gO(e,n,t[n]);return e},kp=(e,t)=>aK(e,oK(t)),M5=(e,t)=>{var n={};for(var r in e)xS.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Yh)for(var r of Yh(e))t.indexOf(r)<0&&j5.call(e,r)&&(n[r]=e[r]);return n},uK=(e,t)=>function(){return t||(0,e[R5(e)[0]])((t={exports:{}}).exports,t),t.exports},cK=(e,t)=>{for(var n in t)Ep(e,n,{get:t[n],enumerable:!0})},fK=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of R5(t))!xS.call(e,i)&&i!==n&&Ep(e,i,{get:()=>t[i],enumerable:!(r=sK(t,i))||r.enumerable});return e},dK=(e,t,n)=>(n=e!=null?iK(lK(e)):{},fK(!e||!e.__esModule?Ep(n,"default",{value:e,enumerable:!0}):n,e)),hK=uK({"../../node_modules/.pnpm/prismjs@1.29.0_patch_hash=vrxx3pzkik6jpmgpayxfjunetu/node_modules/prismjs/prism.js"(e,t){var n=function(){var r=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,i=0,a={},o={util:{encode:function v(w){return w instanceof l?new l(w.type,v(w.content),w.alias):Array.isArray(w)?w.map(v):w.replace(/&/g,"&").replace(/</g,"<").replace(/\u00a0/g," ")},type:function(v){return Object.prototype.toString.call(v).slice(8,-1)},objId:function(v){return v.__id||Object.defineProperty(v,"__id",{value:++i}),v.__id},clone:function v(w,b){b=b||{};var _,S;switch(o.util.type(w)){case"Object":if(S=o.util.objId(w),b[S])return b[S];_={},b[S]=_;for(var x in w)w.hasOwnProperty(x)&&(_[x]=v(w[x],b));return _;case"Array":return S=o.util.objId(w),b[S]?b[S]:(_=[],b[S]=_,w.forEach(function(A,k){_[k]=v(A,b)}),_);default:return w}},getLanguage:function(v){for(;v;){var w=r.exec(v.className);if(w)return w[1].toLowerCase();v=v.parentElement}return"none"},setLanguage:function(v,w){v.className=v.className.replace(RegExp(r,"gi"),""),v.classList.add("language-"+w)},isActive:function(v,w,b){for(var _="no-"+w;v;){var S=v.classList;if(S.contains(w))return!0;if(S.contains(_))return!1;v=v.parentElement}return!!b}},languages:{plain:a,plaintext:a,text:a,txt:a,extend:function(v,w){var b=o.util.clone(o.languages[v]);for(var _ in w)b[_]=w[_];return b},insertBefore:function(v,w,b,_){_=_||o.languages;var S=_[v],x={};for(var A in S)if(S.hasOwnProperty(A)){if(A==w)for(var k in b)b.hasOwnProperty(k)&&(x[k]=b[k]);b.hasOwnProperty(A)||(x[A]=S[A])}var T=_[v];return _[v]=x,o.languages.DFS(o.languages,function(O,$){$===T&&O!=v&&(this[O]=x)}),x},DFS:function v(w,b,_,S){S=S||{};var x=o.util.objId;for(var A in w)if(w.hasOwnProperty(A)){b.call(w,A,w[A],_||A);var k=w[A],T=o.util.type(k);T==="Object"&&!S[x(k)]?(S[x(k)]=!0,v(k,b,null,S)):T==="Array"&&!S[x(k)]&&(S[x(k)]=!0,v(k,b,A,S))}}},plugins:{},highlight:function(v,w,b){var _={code:v,grammar:w,language:b};if(o.hooks.run("before-tokenize",_),!_.grammar)throw new Error('The language "'+_.language+'" has no grammar.');return _.tokens=o.tokenize(_.code,_.grammar),o.hooks.run("after-tokenize",_),l.stringify(o.util.encode(_.tokens),_.language)},tokenize:function(v,w){var b=w.rest;if(b){for(var _ in b)w[_]=b[_];delete w.rest}var S=new d;return h(S,S.head,v),f(v,S,w,S.head,0),g(S)},hooks:{all:{},add:function(v,w){var b=o.hooks.all;b[v]=b[v]||[],b[v].push(w)},run:function(v,w){var b=o.hooks.all[v];if(!(!b||!b.length))for(var _=0,S;S=b[_++];)S(w)}},Token:l};function l(v,w,b,_){this.type=v,this.content=w,this.alias=b,this.length=(_||"").length|0}l.stringify=function v(w,b){if(typeof w=="string")return w;if(Array.isArray(w)){var _="";return w.forEach(function(T){_+=v(T,b)}),_}var S={type:w.type,content:v(w.content,b),tag:"span",classes:["token",w.type],attributes:{},language:b},x=w.alias;x&&(Array.isArray(x)?Array.prototype.push.apply(S.classes,x):S.classes.push(x)),o.hooks.run("wrap",S);var A="";for(var k in S.attributes)A+=" "+k+'="'+(S.attributes[k]||"").replace(/"/g,""")+'"';return"<"+S.tag+' class="'+S.classes.join(" ")+'"'+A+">"+S.content+"</"+S.tag+">"};function c(v,w,b,_){v.lastIndex=w;var S=v.exec(b);if(S&&_&&S[1]){var x=S[1].length;S.index+=x,S[0]=S[0].slice(x)}return S}function f(v,w,b,_,S,x){for(var A in b)if(!(!b.hasOwnProperty(A)||!b[A])){var k=b[A];k=Array.isArray(k)?k:[k];for(var T=0;T<k.length;++T){if(x&&x.cause==A+","+T)return;var O=k[T],$=O.inside,L=!!O.lookbehind,M=!!O.greedy,z=O.alias;if(M&&!O.pattern.global){var P=O.pattern.toString().match(/[imsuy]*$/)[0];O.pattern=RegExp(O.pattern.source,P+"g")}for(var q=O.pattern||O,D=_.next,H=S;D!==w.tail&&!(x&&H>=x.reach);H+=D.value.length,D=D.next){var B=D.value;if(w.length>v.length)return;if(!(B instanceof l)){var G=1,K;if(M){if(K=c(q,H,v,L),!K||K.index>=v.length)break;var X=K.index,Q=K.index+K[0].length,R=H;for(R+=D.value.length;X>=R;)D=D.next,R+=D.value.length;if(R-=D.value.length,H=R,D.value instanceof l)continue;for(var V=D;V!==w.tail&&(R<Q||typeof V.value=="string");V=V.next)G++,R+=V.value.length;G--,B=v.slice(H,R),K.index-=H}else if(K=c(q,0,B,L),!K)continue;var X=K.index,j=K[0],I=B.slice(0,X),U=B.slice(X+j.length),Y=H+B.length;x&&Y>x.reach&&(x.reach=Y);var ne=D.prev;I&&(ne=h(w,ne,I),H+=I.length),m(w,ne,G);var ae=new l(A,$?o.tokenize(j,$):j,z,j);if(D=h(w,ne,ae),U&&h(w,D,U),G>1){var re={cause:A+","+T,reach:Y};f(v,w,b,D.prev,H,re),x&&re.reach>x.reach&&(x.reach=re.reach)}}}}}}function d(){var v={value:null,prev:null,next:null},w={value:null,prev:v,next:null};v.next=w,this.head=v,this.tail=w,this.length=0}function h(v,w,b){var _=w.next,S={value:b,prev:w,next:_};return w.next=S,_.prev=S,v.length++,S}function m(v,w,b){for(var _=w.next,S=0;S<b&&_!==v.tail;S++)_=_.next;w.next=_,_.prev=w,v.length-=S}function g(v){for(var w=[],b=v.head.next;b!==v.tail;)w.push(b.value),b=b.next;return w}return o}();t.exports=n,n.default=n}}),be=dK(hK());be.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},be.languages.markup.tag.inside["attr-value"].inside.entity=be.languages.markup.entity,be.languages.markup.doctype.inside["internal-subset"].inside=be.languages.markup,be.hooks.add("wrap",function(e){e.type==="entity"&&(e.attributes.title=e.content.replace(/&/,"&"))}),Object.defineProperty(be.languages.markup.tag,"addInlined",{value:function(e,r){var n={},n=(n["language-"+r]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:be.languages[r]},n.cdata=/^<!\[CDATA\[|\]\]>$/i,{"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:n}}),r=(n["language-"+r]={pattern:/[\s\S]+/,inside:be.languages[r]},{});r[e]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return e}),"i"),lookbehind:!0,greedy:!0,inside:n},be.languages.insertBefore("markup","cdata",r)}}),Object.defineProperty(be.languages.markup.tag,"addAttribute",{value:function(e,t){be.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+e+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[t,"language-"+t],inside:be.languages[t]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),be.languages.html=be.languages.markup,be.languages.mathml=be.languages.markup,be.languages.svg=be.languages.markup,be.languages.xml=be.languages.extend("markup",{}),be.languages.ssml=be.languages.xml,be.languages.atom=be.languages.xml,be.languages.rss=be.languages.xml,function(e){var t={pattern:/\\[\\(){}[\]^$+*?|.]/,alias:"escape"},n=/\\(?:x[\da-fA-F]{2}|u[\da-fA-F]{4}|u\{[\da-fA-F]+\}|0[0-7]{0,2}|[123][0-7]{2}|c[a-zA-Z]|.)/,r="(?:[^\\\\-]|"+n.source+")",r=RegExp(r+"-"+r),i={pattern:/(<|')[^<>']+(?=[>']$)/,lookbehind:!0,alias:"variable"};e.languages.regex={"char-class":{pattern:/((?:^|[^\\])(?:\\\\)*)\[(?:[^\\\]]|\\[\s\S])*\]/,lookbehind:!0,inside:{"char-class-negation":{pattern:/(^\[)\^/,lookbehind:!0,alias:"operator"},"char-class-punctuation":{pattern:/^\[|\]$/,alias:"punctuation"},range:{pattern:r,inside:{escape:n,"range-punctuation":{pattern:/-/,alias:"operator"}}},"special-escape":t,"char-set":{pattern:/\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},escape:n}},"special-escape":t,"char-set":{pattern:/\.|\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},backreference:[{pattern:/\\(?![123][0-7]{2})[1-9]/,alias:"keyword"},{pattern:/\\k<[^<>']+>/,alias:"keyword",inside:{"group-name":i}}],anchor:{pattern:/[$^]|\\[ABbGZz]/,alias:"function"},escape:n,group:[{pattern:/\((?:\?(?:<[^<>']+>|'[^<>']+'|[>:]|<?[=!]|[idmnsuxU]+(?:-[idmnsuxU]+)?:?))?/,alias:"punctuation",inside:{"group-name":i}},{pattern:/\)/,alias:"punctuation"}],quantifier:{pattern:/(?:[+*?]|\{\d+(?:,\d*)?\})[?+]?/,alias:"number"},alternation:{pattern:/\|/,alias:"keyword"}}}(be),be.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},be.languages.javascript=be.languages.extend("clike",{"class-name":[be.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),be.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,be.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:be.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:be.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:be.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:be.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:be.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),be.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:be.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),be.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),be.languages.markup&&(be.languages.markup.tag.addInlined("script","javascript"),be.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),be.languages.js=be.languages.javascript,be.languages.actionscript=be.languages.extend("javascript",{keyword:/\b(?:as|break|case|catch|class|const|default|delete|do|dynamic|each|else|extends|final|finally|for|function|get|if|implements|import|in|include|instanceof|interface|internal|is|namespace|native|new|null|override|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|use|var|void|while|with)\b/,operator:/\+\+|--|(?:[+\-*\/%^]|&&?|\|\|?|<<?|>>?>?|[!=]=?)=?|[~?@]/}),be.languages.actionscript["class-name"].alias="function",delete be.languages.actionscript.parameter,delete be.languages.actionscript["literal-property"],be.languages.markup&&be.languages.insertBefore("actionscript","string",{xml:{pattern:/(^|[^.])<\/?\w+(?:\s+[^\s>\/=]+=("|')(?:\\[\s\S]|(?!\2)[^\\])*\2)*\s*\/?>/,lookbehind:!0,inside:be.languages.markup}}),function(e){var t=/#(?!\{).+/,n={pattern:/#\{[^}]+\}/,alias:"variable"};e.languages.coffeescript=e.languages.extend("javascript",{comment:t,string:[{pattern:/'(?:\\[\s\S]|[^\\'])*'/,greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,greedy:!0,inside:{interpolation:n}}],keyword:/\b(?:and|break|by|catch|class|continue|debugger|delete|do|each|else|extend|extends|false|finally|for|if|in|instanceof|is|isnt|let|loop|namespace|new|no|not|null|of|off|on|or|own|return|super|switch|then|this|throw|true|try|typeof|undefined|unless|until|when|while|window|with|yes|yield)\b/,"class-member":{pattern:/@(?!\d)\w+/,alias:"variable"}}),e.languages.insertBefore("coffeescript","comment",{"multiline-comment":{pattern:/###[\s\S]+?###/,alias:"comment"},"block-regex":{pattern:/\/{3}[\s\S]*?\/{3}/,alias:"regex",inside:{comment:t,interpolation:n}}}),e.languages.insertBefore("coffeescript","string",{"inline-javascript":{pattern:/`(?:\\[\s\S]|[^\\`])*`/,inside:{delimiter:{pattern:/^`|`$/,alias:"punctuation"},script:{pattern:/[\s\S]+/,alias:"language-javascript",inside:e.languages.javascript}}},"multiline-string":[{pattern:/'''[\s\S]*?'''/,greedy:!0,alias:"string"},{pattern:/"""[\s\S]*?"""/,greedy:!0,alias:"string",inside:{interpolation:n}}]}),e.languages.insertBefore("coffeescript","keyword",{property:/(?!\d)\w+(?=\s*:(?!:))/}),delete e.languages.coffeescript["template-string"],e.languages.coffee=e.languages.coffeescript}(be),function(e){var t=e.languages.javadoclike={parameter:{pattern:/(^[\t ]*(?:\/{3}|\*|\/\*\*)\s*@(?:arg|arguments|param)\s+)\w+/m,lookbehind:!0},keyword:{pattern:/(^[\t ]*(?:\/{3}|\*|\/\*\*)\s*|\{)@[a-z][a-zA-Z-]+\b/m,lookbehind:!0},punctuation:/[{}]/};Object.defineProperty(t,"addSupport",{value:function(n,r){(n=typeof n=="string"?[n]:n).forEach(function(i){var a=function(h){h.inside||(h.inside={}),h.inside.rest=r},o="doc-comment";if(l=e.languages[i]){var l,c=l[o];if((c=c||(l=e.languages.insertBefore(i,"comment",{"doc-comment":{pattern:/(^|[^\\])\/\*\*[^/][\s\S]*?(?:\*\/|$)/,lookbehind:!0,alias:"comment"}}))[o])instanceof RegExp&&(c=l[o]={pattern:c}),Array.isArray(c))for(var f=0,d=c.length;f<d;f++)c[f]instanceof RegExp&&(c[f]={pattern:c[f]}),a(c[f]);else a(c)}})}}),t.addSupport(["java","javascript","php"],t)}(be),function(e){var t=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/,t=(e.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+t.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+t.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+t.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+t.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:t,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},e.languages.css.atrule.inside.rest=e.languages.css,e.languages.markup);t&&(t.tag.addInlined("style","css"),t.tag.addAttribute("style","css"))}(be),function(e){var t=/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,t=(e.languages.css.selector={pattern:e.languages.css.selector.pattern,lookbehind:!0,inside:t={"pseudo-element":/:(?:after|before|first-letter|first-line|selection)|::[-\w]+/,"pseudo-class":/:[-\w]+/,class:/\.[-\w]+/,id:/#[-\w]+/,attribute:{pattern:RegExp(`\\[(?:[^[\\]"']|`+t.source+")*\\]"),greedy:!0,inside:{punctuation:/^\[|\]$/,"case-sensitivity":{pattern:/(\s)[si]$/i,lookbehind:!0,alias:"keyword"},namespace:{pattern:/^(\s*)(?:(?!\s)[-*\w\xA0-\uFFFF])*\|(?!=)/,lookbehind:!0,inside:{punctuation:/\|$/}},"attr-name":{pattern:/^(\s*)(?:(?!\s)[-\w\xA0-\uFFFF])+/,lookbehind:!0},"attr-value":[t,{pattern:/(=\s*)(?:(?!\s)[-\w\xA0-\uFFFF])+(?=\s*$)/,lookbehind:!0}],operator:/[|~*^$]?=/}},"n-th":[{pattern:/(\(\s*)[+-]?\d*[\dn](?:\s*[+-]\s*\d+)?(?=\s*\))/,lookbehind:!0,inside:{number:/[\dn]+/,operator:/[+-]/}},{pattern:/(\(\s*)(?:even|odd)(?=\s*\))/i,lookbehind:!0}],combinator:/>|\+|~|\|\|/,punctuation:/[(),]/}},e.languages.css.atrule.inside["selector-function-argument"].inside=t,e.languages.insertBefore("css","property",{variable:{pattern:/(^|[^-\w\xA0-\uFFFF])--(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*/i,lookbehind:!0}}),{pattern:/(\b\d+)(?:%|[a-z]+(?![\w-]))/,lookbehind:!0}),n={pattern:/(^|[^\w.-])-?(?:\d+(?:\.\d+)?|\.\d+)/,lookbehind:!0};e.languages.insertBefore("css","function",{operator:{pattern:/(\s)[+\-*\/](?=\s)/,lookbehind:!0},hexcode:{pattern:/\B#[\da-f]{3,8}\b/i,alias:"color"},color:[{pattern:/(^|[^\w-])(?:AliceBlue|AntiqueWhite|Aqua|Aquamarine|Azure|Beige|Bisque|Black|BlanchedAlmond|Blue|BlueViolet|Brown|BurlyWood|CadetBlue|Chartreuse|Chocolate|Coral|CornflowerBlue|Cornsilk|Crimson|Cyan|DarkBlue|DarkCyan|DarkGoldenRod|DarkGr[ae]y|DarkGreen|DarkKhaki|DarkMagenta|DarkOliveGreen|DarkOrange|DarkOrchid|DarkRed|DarkSalmon|DarkSeaGreen|DarkSlateBlue|DarkSlateGr[ae]y|DarkTurquoise|DarkViolet|DeepPink|DeepSkyBlue|DimGr[ae]y|DodgerBlue|FireBrick|FloralWhite|ForestGreen|Fuchsia|Gainsboro|GhostWhite|Gold|GoldenRod|Gr[ae]y|Green|GreenYellow|HoneyDew|HotPink|IndianRed|Indigo|Ivory|Khaki|Lavender|LavenderBlush|LawnGreen|LemonChiffon|LightBlue|LightCoral|LightCyan|LightGoldenRodYellow|LightGr[ae]y|LightGreen|LightPink|LightSalmon|LightSeaGreen|LightSkyBlue|LightSlateGr[ae]y|LightSteelBlue|LightYellow|Lime|LimeGreen|Linen|Magenta|Maroon|MediumAquaMarine|MediumBlue|MediumOrchid|MediumPurple|MediumSeaGreen|MediumSlateBlue|MediumSpringGreen|MediumTurquoise|MediumVioletRed|MidnightBlue|MintCream|MistyRose|Moccasin|NavajoWhite|Navy|OldLace|Olive|OliveDrab|Orange|OrangeRed|Orchid|PaleGoldenRod|PaleGreen|PaleTurquoise|PaleVioletRed|PapayaWhip|PeachPuff|Peru|Pink|Plum|PowderBlue|Purple|RebeccaPurple|Red|RosyBrown|RoyalBlue|SaddleBrown|Salmon|SandyBrown|SeaGreen|SeaShell|Sienna|Silver|SkyBlue|SlateBlue|SlateGr[ae]y|Snow|SpringGreen|SteelBlue|Tan|Teal|Thistle|Tomato|Transparent|Turquoise|Violet|Wheat|White|WhiteSmoke|Yellow|YellowGreen)(?![\w-])/i,lookbehind:!0},{pattern:/\b(?:hsl|rgb)\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*\)\B|\b(?:hsl|rgb)a\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*(?:0|0?\.\d+|1)\s*\)\B/i,inside:{unit:t,number:n,function:/[\w-]+(?=\()/,punctuation:/[(),]/}}],entity:/\\[\da-f]{1,8}/i,unit:t,number:n})}(be),function(e){var t=/[*&][^\s[\]{},]+/,n=/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,r="(?:"+n.source+"(?:[ ]+"+t.source+")?|"+t.source+"(?:[ ]+"+n.source+")?)",i=/(?:[^\s\x00-\x08\x0e-\x1f!"#%&'*,\-:>?@[\]`{|}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]|[?:-]<PLAIN>)(?:[ \t]*(?:(?![#:])<PLAIN>|:<PLAIN>))*/.source.replace(/<PLAIN>/g,function(){return/[^\s\x00-\x08\x0e-\x1f,[\]{}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]/.source}),a=/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/.source;function o(l,c){c=(c||"").replace(/m/g,"")+"m";var f=/([:\-,[{]\s*(?:\s<<prop>>[ \t]+)?)(?:<<value>>)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source.replace(/<<prop>>/g,function(){return r}).replace(/<<value>>/g,function(){return l});return RegExp(f,c)}e.languages.yaml={scalar:{pattern:RegExp(/([\-:]\s*(?:\s<<prop>>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)\S[^\r\n]*(?:\2[^\r\n]+)*)/.source.replace(/<<prop>>/g,function(){return r})),lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:RegExp(/((?:^|[:\-,[{\r\n?])[ \t]*(?:<<prop>>[ \t]+)?)<<key>>(?=\s*:\s)/.source.replace(/<<prop>>/g,function(){return r}).replace(/<<key>>/g,function(){return"(?:"+i+"|"+a+")"})),lookbehind:!0,greedy:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:o(/\d{4}-\d\d?-\d\d?(?:[tT]|[ \t]+)\d\d?:\d{2}:\d{2}(?:\.\d*)?(?:[ \t]*(?:Z|[-+]\d\d?(?::\d{2})?))?|\d{4}-\d{2}-\d{2}|\d\d?:\d{2}(?::\d{2}(?:\.\d*)?)?/.source),lookbehind:!0,alias:"number"},boolean:{pattern:o(/false|true/.source,"i"),lookbehind:!0,alias:"important"},null:{pattern:o(/null|~/.source,"i"),lookbehind:!0,alias:"important"},string:{pattern:o(a),lookbehind:!0,greedy:!0},number:{pattern:o(/[+-]?(?:0x[\da-f]+|0o[0-7]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|\.inf|\.nan)/.source,"i"),lookbehind:!0},tag:n,important:t,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./},e.languages.yml=e.languages.yaml}(be),function(e){var t=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function n(f){return f=f.replace(/<inner>/g,function(){return t}),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+f+")")}var r=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,i=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,function(){return r}),a=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source,o=(e.languages.markdown=e.languages.extend("markup",{}),e.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:e.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+i+a+"(?:"+i+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+i+a+")(?:"+i+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(r),inside:e.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+i+")"+a+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+i+"$"),inside:{"table-header":{pattern:RegExp(r),alias:"important",inside:e.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:n(/\b__(?:(?!_)<inner>|_(?:(?!_)<inner>)+_)+__\b|\*\*(?:(?!\*)<inner>|\*(?:(?!\*)<inner>)+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:n(/\b_(?:(?!_)<inner>|__(?:(?!_)<inner>)+__)+_\b|\*(?:(?!\*)<inner>|\*\*(?:(?!\*)<inner>)+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:n(/(~~?)(?:(?!~)<inner>)+\2/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:["code","keyword"]},url:{pattern:n(/!?\[(?:(?!\])<inner>)+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\])<inner>)+\])/.source),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),["url","bold","italic","strike"].forEach(function(f){["url","bold","italic","strike","code-snippet"].forEach(function(d){f!==d&&(e.languages.markdown[f].inside.content.inside[d]=e.languages.markdown[d])})}),e.hooks.add("after-tokenize",function(f){f.language!=="markdown"&&f.language!=="md"||function d(h){if(h&&typeof h!="string")for(var m=0,g=h.length;m<g;m++){var v,w=h[m];w.type!=="code"?d(w.content):(v=w.content[1],w=w.content[3],v&&w&&v.type==="code-language"&&w.type==="code-block"&&typeof v.content=="string"&&(v=v.content.replace(/\b#/g,"sharp").replace(/\b\+\+/g,"pp"),v="language-"+(v=(/[a-z][\w-]*/i.exec(v)||[""])[0].toLowerCase()),w.alias?typeof w.alias=="string"?w.alias=[w.alias,v]:w.alias.push(v):w.alias=[v]))}}(f.tokens)}),e.hooks.add("wrap",function(f){if(f.type==="code-block"){for(var d="",h=0,m=f.classes.length;h<m;h++){var g=f.classes[h],g=/language-(.+)/.exec(g);if(g){d=g[1];break}}var v,w=e.languages[d];w?f.content=e.highlight(function(b){return b=b.replace(o,""),b=b.replace(/&(\w{1,8}|#x?[\da-f]{1,8});/gi,function(_,S){var x;return(S=S.toLowerCase())[0]==="#"?(x=S[1]==="x"?parseInt(S.slice(2),16):Number(S.slice(1)),c(x)):l[S]||_})}(f.content),w,d):d&&d!=="none"&&e.plugins.autoloader&&(v="md-"+new Date().valueOf()+"-"+Math.floor(1e16*Math.random()),f.attributes.id=v,e.plugins.autoloader.loadLanguages(d,function(){var b=document.getElementById(v);b&&(b.innerHTML=e.highlight(b.textContent,e.languages[d],d))}))}}),RegExp(e.languages.markup.tag.pattern.source,"gi")),l={amp:"&",lt:"<",gt:">",quot:'"'},c=String.fromCodePoint||String.fromCharCode;e.languages.md=e.languages.markdown}(be),be.languages.graphql={comment:/#.*/,description:{pattern:/(?:"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*")(?=\s*[a-z_])/i,greedy:!0,alias:"string",inside:{"language-markdown":{pattern:/(^"(?:"")?)(?!\1)[\s\S]+(?=\1$)/,lookbehind:!0,inside:be.languages.markdown}}},string:{pattern:/"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*"/,greedy:!0},number:/(?:\B-|\b)\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,boolean:/\b(?:false|true)\b/,variable:/\$[a-z_]\w*/i,directive:{pattern:/@[a-z_]\w*/i,alias:"function"},"attr-name":{pattern:/\b[a-z_]\w*(?=\s*(?:\((?:[^()"]|"(?:\\.|[^\\"\r\n])*")*\))?:)/i,greedy:!0},"atom-input":{pattern:/\b[A-Z]\w*Input\b/,alias:"class-name"},scalar:/\b(?:Boolean|Float|ID|Int|String)\b/,constant:/\b[A-Z][A-Z_\d]*\b/,"class-name":{pattern:/(\b(?:enum|implements|interface|on|scalar|type|union)\s+|&\s*|:\s*|\[)[A-Z_]\w*/,lookbehind:!0},fragment:{pattern:/(\bfragment\s+|\.{3}\s*(?!on\b))[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-mutation":{pattern:/(\bmutation\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-query":{pattern:/(\bquery\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},keyword:/\b(?:directive|enum|extend|fragment|implements|input|interface|mutation|on|query|repeatable|scalar|schema|subscription|type|union)\b/,operator:/[!=|&]|\.{3}/,"property-query":/\w+(?=\s*\()/,object:/\w+(?=\s*\{)/,punctuation:/[!(){}\[\]:=,]/,property:/\w+/},be.hooks.add("after-tokenize",function(e){if(e.language==="graphql")for(var t=e.tokens.filter(function(v){return typeof v!="string"&&v.type!=="comment"&&v.type!=="scalar"}),n=0;n<t.length;){var r=t[n++];if(r.type==="keyword"&&r.content==="mutation"){var i=[];if(h(["definition-mutation","punctuation"])&&d(1).content==="("){n+=2;var a=m(/^\($/,/^\)$/);if(a===-1)continue;for(;n<a;n++){var o=d(0);o.type==="variable"&&(g(o,"variable-input"),i.push(o.content))}n=a+1}if(h(["punctuation","property-query"])&&d(0).content==="{"&&(n++,g(d(0),"property-mutation"),0<i.length)){var l=m(/^\{$/,/^\}$/);if(l!==-1)for(var c=n;c<l;c++){var f=t[c];f.type==="variable"&&0<=i.indexOf(f.content)&&g(f,"variable-input")}}}}function d(v){return t[n+v]}function h(v,w){w=w||0;for(var b=0;b<v.length;b++){var _=d(b+w);if(!_||_.type!==v[b])return}return 1}function m(v,w){for(var b=1,_=n;_<t.length;_++){var S=t[_],x=S.content;if(S.type==="punctuation"&&typeof x=="string"){if(v.test(x))b++;else if(w.test(x)&&--b===0)return _}}return-1}function g(v,w){var b=v.alias;b?Array.isArray(b)||(v.alias=b=[b]):v.alias=b=[],b.push(w)}}),be.languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},variable:[{pattern:/@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,greedy:!0},/@[\w.$]+/],string:{pattern:/(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,greedy:!0,lookbehind:!0},identifier:{pattern:/(^|[^@\\])`(?:\\[\s\S]|[^`\\]|``)*`/,greedy:!0,lookbehind:!0,inside:{punctuation:/^`|`$/}},function:/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,boolean:/\b(?:FALSE|NULL|TRUE)\b/i,number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/},function(e){var t=e.languages.javascript["template-string"],n=t.pattern.source,r=t.inside.interpolation,i=r.inside["interpolation-punctuation"],a=r.pattern.source;function o(h,m){if(e.languages[h])return{pattern:RegExp("((?:"+m+")\\s*)"+n),lookbehind:!0,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},"embedded-code":{pattern:/[\s\S]+/,alias:h}}}}function l(h,m,g){return h={code:h,grammar:m,language:g},e.hooks.run("before-tokenize",h),h.tokens=e.tokenize(h.code,h.grammar),e.hooks.run("after-tokenize",h),h.tokens}function c(h,m,g){var b=e.tokenize(h,{interpolation:{pattern:RegExp(a),lookbehind:!0}}),v=0,w={},b=l(b.map(function(S){if(typeof S=="string")return S;for(var x,A,S=S.content;h.indexOf((A=v++,x="___"+g.toUpperCase()+"_"+A+"___"))!==-1;);return w[x]=S,x}).join(""),m,g),_=Object.keys(w);return v=0,function S(x){for(var A=0;A<x.length;A++){if(v>=_.length)return;var k,T,O,$,L,M,z,P=x[A];typeof P=="string"||typeof P.content=="string"?(k=_[v],(z=(M=typeof P=="string"?P:P.content).indexOf(k))!==-1&&(++v,T=M.substring(0,z),L=w[k],O=void 0,($={})["interpolation-punctuation"]=i,($=e.tokenize(L,$)).length===3&&((O=[1,1]).push.apply(O,l($[1],e.languages.javascript,"javascript")),$.splice.apply($,O)),O=new e.Token("interpolation",$,r.alias,L),$=M.substring(z+k.length),L=[],T&&L.push(T),L.push(O),$&&(S(M=[$]),L.push.apply(L,M)),typeof P=="string"?(x.splice.apply(x,[A,1].concat(L)),A+=L.length-1):P.content=L)):(z=P.content,Array.isArray(z)?S(z):S([z]))}}(b),new e.Token(g,b,"language-"+g,h)}e.languages.javascript["template-string"]=[o("css",/\b(?:styled(?:\([^)]*\))?(?:\s*\.\s*\w+(?:\([^)]*\))*)*|css(?:\s*\.\s*(?:global|resolve))?|createGlobalStyle|keyframes)/.source),o("html",/\bhtml|\.\s*(?:inner|outer)HTML\s*\+?=/.source),o("svg",/\bsvg/.source),o("markdown",/\b(?:markdown|md)/.source),o("graphql",/\b(?:gql|graphql(?:\s*\.\s*experimental)?)/.source),o("sql",/\bsql/.source),t].filter(Boolean);var f={javascript:!0,js:!0,typescript:!0,ts:!0,jsx:!0,tsx:!0};function d(h){return typeof h=="string"?h:Array.isArray(h)?h.map(d).join(""):d(h.content)}e.hooks.add("after-tokenize",function(h){h.language in f&&function m(g){for(var v=0,w=g.length;v<w;v++){var b,_,S,x=g[v];typeof x!="string"&&(b=x.content,Array.isArray(b)?x.type==="template-string"?(x=b[1],b.length===3&&typeof x!="string"&&x.type==="embedded-code"&&(_=d(x),x=x.alias,x=Array.isArray(x)?x[0]:x,S=e.languages[x])&&(b[1]=c(_,S,x))):m(b):typeof b!="string"&&m([b]))}}(h.tokens)})}(be),function(e){e.languages.typescript=e.languages.extend("javascript",{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),e.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete e.languages.typescript.parameter,delete e.languages.typescript["literal-property"];var t=e.languages.extend("typescript",{});delete t["class-name"],e.languages.typescript["class-name"].inside=t,e.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:t}}}}),e.languages.ts=e.languages.typescript}(be),function(e){var t=e.languages.javascript,n=/\{(?:[^{}]|\{(?:[^{}]|\{[^{}]*\})*\})+\}/.source,r="(@(?:arg|argument|param|property)\\s+(?:"+n+"\\s+)?)";e.languages.jsdoc=e.languages.extend("javadoclike",{parameter:{pattern:RegExp(r+/(?:(?!\s)[$\w\xA0-\uFFFF.])+(?=\s|$)/.source),lookbehind:!0,inside:{punctuation:/\./}}}),e.languages.insertBefore("jsdoc","keyword",{"optional-parameter":{pattern:RegExp(r+/\[(?:(?!\s)[$\w\xA0-\uFFFF.])+(?:=[^[\]]+)?\](?=\s|$)/.source),lookbehind:!0,inside:{parameter:{pattern:/(^\[)[$\w\xA0-\uFFFF\.]+/,lookbehind:!0,inside:{punctuation:/\./}},code:{pattern:/(=)[\s\S]*(?=\]$)/,lookbehind:!0,inside:t,alias:"language-javascript"},punctuation:/[=[\]]/}},"class-name":[{pattern:RegExp(/(@(?:augments|class|extends|interface|memberof!?|template|this|typedef)\s+(?:<TYPE>\s+)?)[A-Z]\w*(?:\.[A-Z]\w*)*/.source.replace(/<TYPE>/g,function(){return n})),lookbehind:!0,inside:{punctuation:/\./}},{pattern:RegExp("(@[a-z]+\\s+)"+n),lookbehind:!0,inside:{string:t.string,number:t.number,boolean:t.boolean,keyword:e.languages.typescript.keyword,operator:/=>|\.\.\.|[&|?:*]/,punctuation:/[.,;=<>{}()[\]]/}}],example:{pattern:/(@example\s+(?!\s))(?:[^@\s]|\s+(?!\s))+?(?=\s*(?:\*\s*)?(?:@\w|\*\/))/,lookbehind:!0,inside:{code:{pattern:/^([\t ]*(?:\*\s*)?)\S.*$/m,lookbehind:!0,inside:t,alias:"language-javascript"}}}}),e.languages.javadoclike.addSupport("javascript",e.languages.jsdoc)}(be),function(e){e.languages.flow=e.languages.extend("javascript",{}),e.languages.insertBefore("flow","keyword",{type:[{pattern:/\b(?:[Bb]oolean|Function|[Nn]umber|[Ss]tring|[Ss]ymbol|any|mixed|null|void)\b/,alias:"class-name"}]}),e.languages.flow["function-variable"].pattern=/(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=\s*(?:function\b|(?:\([^()]*\)(?:\s*:\s*\w+)?|(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/i,delete e.languages.flow.parameter,e.languages.insertBefore("flow","operator",{"flow-punctuation":{pattern:/\{\||\|\}/,alias:"punctuation"}}),Array.isArray(e.languages.flow.keyword)||(e.languages.flow.keyword=[e.languages.flow.keyword]),e.languages.flow.keyword.unshift({pattern:/(^|[^$]\b)(?:Class|declare|opaque|type)\b(?!\$)/,lookbehind:!0},{pattern:/(^|[^$]\B)\$(?:Diff|Enum|Exact|Keys|ObjMap|PropertyType|Record|Shape|Subtype|Supertype|await)\b(?!\$)/,lookbehind:!0})}(be),be.languages.n4js=be.languages.extend("javascript",{keyword:/\b(?:Array|any|boolean|break|case|catch|class|const|constructor|continue|debugger|declare|default|delete|do|else|enum|export|extends|false|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|module|new|null|number|package|private|protected|public|return|set|static|string|super|switch|this|throw|true|try|typeof|var|void|while|with|yield)\b/}),be.languages.insertBefore("n4js","constant",{annotation:{pattern:/@+\w+/,alias:"operator"}}),be.languages.n4jsd=be.languages.n4js,function(e){function t(o,l){return RegExp(o.replace(/<ID>/g,function(){return/(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/.source}),l)}e.languages.insertBefore("javascript","function-variable",{"method-variable":{pattern:RegExp("(\\.\\s*)"+e.languages.javascript["function-variable"].pattern.source),lookbehind:!0,alias:["function-variable","method","function","property-access"]}}),e.languages.insertBefore("javascript","function",{method:{pattern:RegExp("(\\.\\s*)"+e.languages.javascript.function.source),lookbehind:!0,alias:["function","property-access"]}}),e.languages.insertBefore("javascript","constant",{"known-class-name":[{pattern:/\b(?:(?:Float(?:32|64)|(?:Int|Uint)(?:8|16|32)|Uint8Clamped)?Array|ArrayBuffer|BigInt|Boolean|DataView|Date|Error|Function|Intl|JSON|(?:Weak)?(?:Map|Set)|Math|Number|Object|Promise|Proxy|Reflect|RegExp|String|Symbol|WebAssembly)\b/,alias:"class-name"},{pattern:/\b(?:[A-Z]\w*)Error\b/,alias:"class-name"}]}),e.languages.insertBefore("javascript","keyword",{imports:{pattern:t(/(\bimport\b\s*)(?:<ID>(?:\s*,\s*(?:\*\s*as\s+<ID>|\{[^{}]*\}))?|\*\s*as\s+<ID>|\{[^{}]*\})(?=\s*\bfrom\b)/.source),lookbehind:!0,inside:e.languages.javascript},exports:{pattern:t(/(\bexport\b\s*)(?:\*(?:\s*as\s+<ID>)?(?=\s*\bfrom\b)|\{[^{}]*\})/.source),lookbehind:!0,inside:e.languages.javascript}}),e.languages.javascript.keyword.unshift({pattern:/\b(?:as|default|export|from|import)\b/,alias:"module"},{pattern:/\b(?:await|break|catch|continue|do|else|finally|for|if|return|switch|throw|try|while|yield)\b/,alias:"control-flow"},{pattern:/\bnull\b/,alias:["null","nil"]},{pattern:/\bundefined\b/,alias:"nil"}),e.languages.insertBefore("javascript","operator",{spread:{pattern:/\.{3}/,alias:"operator"},arrow:{pattern:/=>/,alias:"operator"}}),e.languages.insertBefore("javascript","punctuation",{"property-access":{pattern:t(/(\.\s*)#?<ID>/.source),lookbehind:!0},"maybe-class-name":{pattern:/(^|[^$\w\xA0-\uFFFF])[A-Z][$\w\xA0-\uFFFF]+/,lookbehind:!0},dom:{pattern:/\b(?:document|(?:local|session)Storage|location|navigator|performance|window)\b/,alias:"variable"},console:{pattern:/\bconsole(?=\s*\.)/,alias:"class-name"}});for(var n=["function","function-variable","method","method-variable","property-access"],r=0;r<n.length;r++){var a=n[r],i=e.languages.javascript[a],a=(i=e.util.type(i)==="RegExp"?e.languages.javascript[a]={pattern:i}:i).inside||{};(i.inside=a)["maybe-class-name"]=/^[A-Z][\s\S]*/}}(be),function(e){var t=e.util.clone(e.languages.javascript),n=/(?:\s|\/\/.*(?!.)|\/\*(?:[^*]|\*(?!\/))\*\/)/.source,r=/(?:\{(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])*\})/.source,i=/(?:\{<S>*\.{3}(?:[^{}]|<BRACES>)*\})/.source;function a(c,f){return c=c.replace(/<S>/g,function(){return n}).replace(/<BRACES>/g,function(){return r}).replace(/<SPREAD>/g,function(){return i}),RegExp(c,f)}i=a(i).source,e.languages.jsx=e.languages.extend("markup",t),e.languages.jsx.tag.pattern=a(/<\/?(?:[\w.:-]+(?:<S>+(?:[\w.:$-]+(?:=(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s{'"/>=]+|<BRACES>))?|<SPREAD>))*<S>*\/?)?>/.source),e.languages.jsx.tag.inside.tag.pattern=/^<\/?[^\s>\/]*/,e.languages.jsx.tag.inside["attr-value"].pattern=/=(?!\{)(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s'">]+)/,e.languages.jsx.tag.inside.tag.inside["class-name"]=/^[A-Z]\w*(?:\.[A-Z]\w*)*$/,e.languages.jsx.tag.inside.comment=t.comment,e.languages.insertBefore("inside","attr-name",{spread:{pattern:a(/<SPREAD>/.source),inside:e.languages.jsx}},e.languages.jsx.tag),e.languages.insertBefore("inside","special-attr",{script:{pattern:a(/=<BRACES>/.source),alias:"language-javascript",inside:{"script-punctuation":{pattern:/^=(?=\{)/,alias:"punctuation"},rest:e.languages.jsx}}},e.languages.jsx.tag);function o(c){for(var f=[],d=0;d<c.length;d++){var h=c[d],m=!1;typeof h!="string"&&(h.type==="tag"&&h.content[0]&&h.content[0].type==="tag"?h.content[0].content[0].content==="</"?0<f.length&&f[f.length-1].tagName===l(h.content[0].content[1])&&f.pop():h.content[h.content.length-1].content!=="/>"&&f.push({tagName:l(h.content[0].content[1]),openedBraces:0}):0<f.length&&h.type==="punctuation"&&h.content==="{"?f[f.length-1].openedBraces++:0<f.length&&0<f[f.length-1].openedBraces&&h.type==="punctuation"&&h.content==="}"?f[f.length-1].openedBraces--:m=!0),(m||typeof h=="string")&&0<f.length&&f[f.length-1].openedBraces===0&&(m=l(h),d<c.length-1&&(typeof c[d+1]=="string"||c[d+1].type==="plain-text")&&(m+=l(c[d+1]),c.splice(d+1,1)),0<d&&(typeof c[d-1]=="string"||c[d-1].type==="plain-text")&&(m=l(c[d-1])+m,c.splice(d-1,1),d--),c[d]=new e.Token("plain-text",m,null,m)),h.content&&typeof h.content!="string"&&o(h.content)}}var l=function(c){return c?typeof c=="string"?c:typeof c.content=="string"?c.content:c.content.map(l).join(""):""};e.hooks.add("after-tokenize",function(c){c.language!=="jsx"&&c.language!=="tsx"||o(c.tokens)})}(be),function(e){var t=e.util.clone(e.languages.typescript),t=(e.languages.tsx=e.languages.extend("jsx",t),delete e.languages.tsx.parameter,delete e.languages.tsx["literal-property"],e.languages.tsx.tag);t.pattern=RegExp(/(^|[^\w$]|(?=<\/))/.source+"(?:"+t.pattern.source+")",t.pattern.flags),t.lookbehind=!0}(be),be.languages.swift={comment:{pattern:/(^|[^\\:])(?:\/\/.*|\/\*(?:[^/*]|\/(?!\*)|\*(?!\/)|\/\*(?:[^*]|\*(?!\/))*\*\/)*\*\/)/,lookbehind:!0,greedy:!0},"string-literal":[{pattern:RegExp(/(^|[^"#])/.source+"(?:"+/"(?:\\(?:\((?:[^()]|\([^()]*\))*\)|\r\n|[^(])|[^\\\r\n"])*"/.source+"|"+/"""(?:\\(?:\((?:[^()]|\([^()]*\))*\)|[^(])|[^\\"]|"(?!""))*"""/.source+")"+/(?!["#])/.source),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\\($/,alias:"punctuation"},punctuation:/\\(?=[\r\n])/,string:/[\s\S]+/}},{pattern:RegExp(/(^|[^"#])(#+)/.source+"(?:"+/"(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|\r\n|[^#])|[^\\\r\n])*?"/.source+"|"+/"""(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|[^#])|[^\\])*?"""/.source+")\\2"),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\#+\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\#+\($/,alias:"punctuation"},string:/[\s\S]+/}}],directive:{pattern:RegExp(/#/.source+"(?:"+/(?:elseif|if)\b/.source+"(?:[ ]*"+/(?:![ \t]*)?(?:\b\w+\b(?:[ \t]*\((?:[^()]|\([^()]*\))*\))?|\((?:[^()]|\([^()]*\))*\))(?:[ \t]*(?:&&|\|\|))?/.source+")+|"+/(?:else|endif)\b/.source+")"),alias:"property",inside:{"directive-name":/^#\w+/,boolean:/\b(?:false|true)\b/,number:/\b\d+(?:\.\d+)*\b/,operator:/!|&&|\|\||[<>]=?/,punctuation:/[(),]/}},literal:{pattern:/#(?:colorLiteral|column|dsohandle|file(?:ID|Literal|Path)?|function|imageLiteral|line)\b/,alias:"constant"},"other-directive":{pattern:/#\w+\b/,alias:"property"},attribute:{pattern:/@\w+/,alias:"atrule"},"function-definition":{pattern:/(\bfunc\s+)\w+/,lookbehind:!0,alias:"function"},label:{pattern:/\b(break|continue)\s+\w+|\b[a-zA-Z_]\w*(?=\s*:\s*(?:for|repeat|while)\b)/,lookbehind:!0,alias:"important"},keyword:/\b(?:Any|Protocol|Self|Type|actor|as|assignment|associatedtype|associativity|async|await|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic|else|enum|extension|fallthrough|fileprivate|final|for|func|get|guard|higherThan|if|import|in|indirect|infix|init|inout|internal|is|isolated|lazy|left|let|lowerThan|mutating|none|nonisolated|nonmutating|open|operator|optional|override|postfix|precedencegroup|prefix|private|protocol|public|repeat|required|rethrows|return|right|safe|self|set|some|static|struct|subscript|super|switch|throw|throws|try|typealias|unowned|unsafe|var|weak|where|while|willSet)\b/,boolean:/\b(?:false|true)\b/,nil:{pattern:/\bnil\b/,alias:"constant"},"short-argument":/\$\d+\b/,omit:{pattern:/\b_\b/,alias:"keyword"},number:/\b(?:[\d_]+(?:\.[\de_]+)?|0x[a-f0-9_]+(?:\.[a-f0-9p_]+)?|0b[01_]+|0o[0-7_]+)\b/i,"class-name":/\b[A-Z](?:[A-Z_\d]*[a-z]\w*)?\b/,function:/\b[a-z_]\w*(?=\s*\()/i,constant:/\b(?:[A-Z_]{2,}|k[A-Z][A-Za-z_]+)\b/,operator:/[-+*/%=!<>&|^~?]+|\.[.\-+*/%=!<>&|^~?]+/,punctuation:/[{}[\]();,.:\\]/},be.languages.swift["string-literal"].forEach(function(e){e.inside.interpolation.inside=be.languages.swift}),function(e){e.languages.kotlin=e.languages.extend("clike",{keyword:{pattern:/(^|[^.])\b(?:abstract|actual|annotation|as|break|by|catch|class|companion|const|constructor|continue|crossinline|data|do|dynamic|else|enum|expect|external|final|finally|for|fun|get|if|import|in|infix|init|inline|inner|interface|internal|is|lateinit|noinline|null|object|open|operator|out|override|package|private|protected|public|reified|return|sealed|set|super|suspend|tailrec|this|throw|to|try|typealias|val|var|vararg|when|where|while)\b/,lookbehind:!0},function:[{pattern:/(?:`[^\r\n`]+`|\b\w+)(?=\s*\()/,greedy:!0},{pattern:/(\.)(?:`[^\r\n`]+`|\w+)(?=\s*\{)/,lookbehind:!0,greedy:!0}],number:/\b(?:0[xX][\da-fA-F]+(?:_[\da-fA-F]+)*|0[bB][01]+(?:_[01]+)*|\d+(?:_\d+)*(?:\.\d+(?:_\d+)*)?(?:[eE][+-]?\d+(?:_\d+)*)?[fFL]?)\b/,operator:/\+[+=]?|-[-=>]?|==?=?|!(?:!|==?)?|[\/*%<>]=?|[?:]:?|\.\.|&&|\|\||\b(?:and|inv|or|shl|shr|ushr|xor)\b/}),delete e.languages.kotlin["class-name"];var t={"interpolation-punctuation":{pattern:/^\$\{?|\}$/,alias:"punctuation"},expression:{pattern:/[\s\S]+/,inside:e.languages.kotlin}};e.languages.insertBefore("kotlin","string",{"string-literal":[{pattern:/"""(?:[^$]|\$(?:(?!\{)|\{[^{}]*\}))*?"""/,alias:"multiline",inside:{interpolation:{pattern:/\$(?:[a-z_]\w*|\{[^{}]*\})/i,inside:t},string:/[\s\S]+/}},{pattern:/"(?:[^"\\\r\n$]|\\.|\$(?:(?!\{)|\{[^{}]*\}))*"/,alias:"singleline",inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$(?:[a-z_]\w*|\{[^{}]*\})/i,lookbehind:!0,inside:t},string:/[\s\S]+/}}],char:{pattern:/'(?:[^'\\\r\n]|\\(?:.|u[a-fA-F0-9]{0,4}))'/,greedy:!0}}),delete e.languages.kotlin.string,e.languages.insertBefore("kotlin","keyword",{annotation:{pattern:/\B@(?:\w+:)?(?:[A-Z]\w*|\[[^\]]+\])/,alias:"builtin"}}),e.languages.insertBefore("kotlin","function",{label:{pattern:/\b\w+@|@\w+\b/,alias:"symbol"}}),e.languages.kt=e.languages.kotlin,e.languages.kts=e.languages.kotlin}(be),be.languages.c=be.languages.extend("clike",{comment:{pattern:/\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,lookbehind:!0},keyword:/\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:/(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/}),be.languages.insertBefore("c","string",{char:{pattern:/'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,greedy:!0}}),be.languages.insertBefore("c","string",{macro:{pattern:/(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:"property",inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},be.languages.c.string],char:be.languages.c.char,comment:be.languages.c.comment,"macro-name":[{pattern:/(^#\s*define\s+)\w+\b(?!\()/i,lookbehind:!0},{pattern:/(^#\s*define\s+)\w+\b(?=\()/i,lookbehind:!0,alias:"function"}],directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:"keyword"},"directive-hash":/^#/,punctuation:/##|\\(?=[\r\n])/,expression:{pattern:/\S[\s\S]*/,inside:be.languages.c}}}}),be.languages.insertBefore("c","function",{constant:/\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/}),delete be.languages.c.boolean,be.languages.objectivec=be.languages.extend("c",{string:{pattern:/@?"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},keyword:/\b(?:asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|in|inline|int|long|register|return|self|short|signed|sizeof|static|struct|super|switch|typedef|typeof|union|unsigned|void|volatile|while)\b|(?:@interface|@end|@implementation|@protocol|@class|@public|@protected|@private|@property|@try|@catch|@finally|@throw|@synthesize|@dynamic|@selector)\b/,operator:/-[->]?|\+\+?|!=?|<<?=?|>>?=?|==?|&&?|\|\|?|[~^%?*\/@]/}),delete be.languages.objectivec["class-name"],be.languages.objc=be.languages.objectivec,be.languages.reason=be.languages.extend("clike",{string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^\\\r\n"])*"/,greedy:!0},"class-name":/\b[A-Z]\w*/,keyword:/\b(?:and|as|assert|begin|class|constraint|do|done|downto|else|end|exception|external|for|fun|function|functor|if|in|include|inherit|initializer|lazy|let|method|module|mutable|new|nonrec|object|of|open|or|private|rec|sig|struct|switch|then|to|try|type|val|virtual|when|while|with)\b/,operator:/\.{3}|:[:=]|\|>|->|=(?:==?|>)?|<=?|>=?|[|^?'#!~`]|[+\-*\/]\.?|\b(?:asr|land|lor|lsl|lsr|lxor|mod)\b/}),be.languages.insertBefore("reason","class-name",{char:{pattern:/'(?:\\x[\da-f]{2}|\\o[0-3][0-7][0-7]|\\\d{3}|\\.|[^'\\\r\n])'/,greedy:!0},constructor:/\b[A-Z]\w*\b(?!\s*\.)/,label:{pattern:/\b[a-z]\w*(?=::)/,alias:"symbol"}}),delete be.languages.reason.function,function(e){for(var t=/\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|<self>)*\*\//.source,n=0;n<2;n++)t=t.replace(/<self>/g,function(){return t});t=t.replace(/<self>/g,function(){return/[^\s\S]/.source}),e.languages.rust={comment:[{pattern:RegExp(/(^|[^\\])/.source+t),lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/b?"(?:\\[\s\S]|[^\\"])*"|b?r(#*)"(?:[^"]|"(?!\1))*"\1/,greedy:!0},char:{pattern:/b?'(?:\\(?:x[0-7][\da-fA-F]|u\{(?:[\da-fA-F]_*){1,6}\}|.)|[^\\\r\n\t'])'/,greedy:!0},attribute:{pattern:/#!?\[(?:[^\[\]"]|"(?:\\[\s\S]|[^\\"])*")*\]/,greedy:!0,alias:"attr-name",inside:{string:null}},"closure-params":{pattern:/([=(,:]\s*|\bmove\s*)\|[^|]*\||\|[^|]*\|(?=\s*(?:\{|->))/,lookbehind:!0,greedy:!0,inside:{"closure-punctuation":{pattern:/^\||\|$/,alias:"punctuation"},rest:null}},"lifetime-annotation":{pattern:/'\w+/,alias:"symbol"},"fragment-specifier":{pattern:/(\$\w+:)[a-z]+/,lookbehind:!0,alias:"punctuation"},variable:/\$\w+/,"function-definition":{pattern:/(\bfn\s+)\w+/,lookbehind:!0,alias:"function"},"type-definition":{pattern:/(\b(?:enum|struct|trait|type|union)\s+)\w+/,lookbehind:!0,alias:"class-name"},"module-declaration":[{pattern:/(\b(?:crate|mod)\s+)[a-z][a-z_\d]*/,lookbehind:!0,alias:"namespace"},{pattern:/(\b(?:crate|self|super)\s*)::\s*[a-z][a-z_\d]*\b(?:\s*::(?:\s*[a-z][a-z_\d]*\s*::)*)?/,lookbehind:!0,alias:"namespace",inside:{punctuation:/::/}}],keyword:[/\b(?:Self|abstract|as|async|await|become|box|break|const|continue|crate|do|dyn|else|enum|extern|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|override|priv|pub|ref|return|self|static|struct|super|trait|try|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/,/\b(?:bool|char|f(?:32|64)|[ui](?:8|16|32|64|128|size)|str)\b/],function:/\b[a-z_]\w*(?=\s*(?:::\s*<|\())/,macro:{pattern:/\b\w+!/,alias:"property"},constant:/\b[A-Z_][A-Z_\d]+\b/,"class-name":/\b[A-Z]\w*\b/,namespace:{pattern:/(?:\b[a-z][a-z_\d]*\s*::\s*)*\b[a-z][a-z_\d]*\s*::(?!\s*<)/,inside:{punctuation:/::/}},number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)(?:_?(?:f32|f64|[iu](?:8|16|32|64|size)?))?\b/,boolean:/\b(?:false|true)\b/,punctuation:/->|\.\.=|\.{1,3}|::|[{}[\];(),:]/,operator:/[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<<?=?|>>?=?|[@?]/},e.languages.rust["closure-params"].inside.rest=e.languages.rust,e.languages.rust.attribute.inside.string=e.languages.rust.string}(be),be.languages.go=be.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"|`[^`]*`/,lookbehind:!0,greedy:!0},keyword:/\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/,boolean:/\b(?:_|false|iota|nil|true)\b/,number:[/\b0(?:b[01_]+|o[0-7_]+)i?\b/i,/\b0x(?:[a-f\d_]+(?:\.[a-f\d_]*)?|\.[a-f\d_]+)(?:p[+-]?\d+(?:_\d+)*)?i?(?!\w)/i,/(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?[\d_]+)?i?(?!\w)/i],operator:/[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./,builtin:/\b(?:append|bool|byte|cap|close|complex|complex(?:64|128)|copy|delete|error|float(?:32|64)|u?int(?:8|16|32|64)?|imag|len|make|new|panic|print(?:ln)?|real|recover|rune|string|uintptr)\b/}),be.languages.insertBefore("go","string",{char:{pattern:/'(?:\\.|[^'\\\r\n]){0,10}'/,greedy:!0}}),delete be.languages.go["class-name"],function(e){var t=/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,n=/\b(?!<keyword>)\w+(?:\s*\.\s*\w+)*\b/.source.replace(/<keyword>/g,function(){return t.source});e.languages.cpp=e.languages.extend("c",{"class-name":[{pattern:RegExp(/(\b(?:class|concept|enum|struct|typename)\s+)(?!<keyword>)\w+/.source.replace(/<keyword>/g,function(){return t.source})),lookbehind:!0},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/],keyword:t,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,greedy:!0},operator:/>>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:false|true)\b/}),e.languages.insertBefore("cpp","string",{module:{pattern:RegExp(/(\b(?:import|module)\s+)/.source+"(?:"+/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source+"|"+/<mod-name>(?:\s*:\s*<mod-name>)?|:\s*<mod-name>/.source.replace(/<mod-name>/g,function(){return n})+")"),lookbehind:!0,greedy:!0,inside:{string:/^[<"][\s\S]+/,operator:/:/,punctuation:/\./}},"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}),e.languages.insertBefore("cpp","keyword",{"generic-function":{pattern:/\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,inside:{function:/^\w+/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:e.languages.cpp}}}}),e.languages.insertBefore("cpp","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}}),e.languages.insertBefore("cpp","class-name",{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:e.languages.extend("cpp",{})}}),e.languages.insertBefore("inside","double-colon",{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},e.languages.cpp["base-clause"])}(be),be.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern://,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},be.languages.python["string-interpolation"].inside.interpolation.inside.rest=be.languages.python,be.languages.py=be.languages.python,be.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}},be.languages.webmanifest=be.languages.json;var $5={};cK($5,{dracula:()=>mK,duotoneDark:()=>yK,duotoneLight:()=>vK,github:()=>xK,gruvboxMaterialDark:()=>XK,gruvboxMaterialLight:()=>QK,jettwaveDark:()=>BK,jettwaveLight:()=>VK,nightOwl:()=>SK,nightOwlLight:()=>kK,oceanicNext:()=>TK,okaidia:()=>OK,oneDark:()=>GK,oneLight:()=>ZK,palenight:()=>RK,shadesOfPurple:()=>MK,synthwave84:()=>DK,ultramin:()=>PK,vsDark:()=>D5,vsLight:()=>qK});var pK={plain:{color:"#F8F8F2",backgroundColor:"#282A36"},styles:[{types:["prolog","constant","builtin"],style:{color:"rgb(189, 147, 249)"}},{types:["inserted","function"],style:{color:"rgb(80, 250, 123)"}},{types:["deleted"],style:{color:"rgb(255, 85, 85)"}},{types:["changed"],style:{color:"rgb(255, 184, 108)"}},{types:["punctuation","symbol"],style:{color:"rgb(248, 248, 242)"}},{types:["string","char","tag","selector"],style:{color:"rgb(255, 121, 198)"}},{types:["keyword","variable"],style:{color:"rgb(189, 147, 249)",fontStyle:"italic"}},{types:["comment"],style:{color:"rgb(98, 114, 164)"}},{types:["attr-name"],style:{color:"rgb(241, 250, 140)"}}]},mK=pK,gK={plain:{backgroundColor:"#2a2734",color:"#9a86fd"},styles:[{types:["comment","prolog","doctype","cdata","punctuation"],style:{color:"#6c6783"}},{types:["namespace"],style:{opacity:.7}},{types:["tag","operator","number"],style:{color:"#e09142"}},{types:["property","function"],style:{color:"#9a86fd"}},{types:["tag-id","selector","atrule-id"],style:{color:"#eeebff"}},{types:["attr-name"],style:{color:"#c4b9fe"}},{types:["boolean","string","entity","url","attr-value","keyword","control","directive","unit","statement","regex","atrule","placeholder","variable"],style:{color:"#ffcc99"}},{types:["deleted"],style:{textDecorationLine:"line-through"}},{types:["inserted"],style:{textDecorationLine:"underline"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["important"],style:{color:"#c4b9fe"}}]},yK=gK,bK={plain:{backgroundColor:"#faf8f5",color:"#728fcb"},styles:[{types:["comment","prolog","doctype","cdata","punctuation"],style:{color:"#b6ad9a"}},{types:["namespace"],style:{opacity:.7}},{types:["tag","operator","number"],style:{color:"#063289"}},{types:["property","function"],style:{color:"#b29762"}},{types:["tag-id","selector","atrule-id"],style:{color:"#2d2006"}},{types:["attr-name"],style:{color:"#896724"}},{types:["boolean","string","entity","url","attr-value","keyword","control","directive","unit","statement","regex","atrule"],style:{color:"#728fcb"}},{types:["placeholder","variable"],style:{color:"#93abdc"}},{types:["deleted"],style:{textDecorationLine:"line-through"}},{types:["inserted"],style:{textDecorationLine:"underline"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["important"],style:{color:"#896724"}}]},vK=bK,_K={plain:{color:"#393A34",backgroundColor:"#f6f8fa"},styles:[{types:["comment","prolog","doctype","cdata"],style:{color:"#999988",fontStyle:"italic"}},{types:["namespace"],style:{opacity:.7}},{types:["string","attr-value"],style:{color:"#e3116c"}},{types:["punctuation","operator"],style:{color:"#393A34"}},{types:["entity","url","symbol","number","boolean","variable","constant","property","regex","inserted"],style:{color:"#36acaa"}},{types:["atrule","keyword","attr-name","selector"],style:{color:"#00a4db"}},{types:["function","deleted","tag"],style:{color:"#d73a49"}},{types:["function-variable"],style:{color:"#6f42c1"}},{types:["tag","selector","keyword"],style:{color:"#00009f"}}]},xK=_K,wK={plain:{color:"#d6deeb",backgroundColor:"#011627"},styles:[{types:["changed"],style:{color:"rgb(162, 191, 252)",fontStyle:"italic"}},{types:["deleted"],style:{color:"rgba(239, 83, 80, 0.56)",fontStyle:"italic"}},{types:["inserted","attr-name"],style:{color:"rgb(173, 219, 103)",fontStyle:"italic"}},{types:["comment"],style:{color:"rgb(99, 119, 119)",fontStyle:"italic"}},{types:["string","url"],style:{color:"rgb(173, 219, 103)"}},{types:["variable"],style:{color:"rgb(214, 222, 235)"}},{types:["number"],style:{color:"rgb(247, 140, 108)"}},{types:["builtin","char","constant","function"],style:{color:"rgb(130, 170, 255)"}},{types:["punctuation"],style:{color:"rgb(199, 146, 234)"}},{types:["selector","doctype"],style:{color:"rgb(199, 146, 234)",fontStyle:"italic"}},{types:["class-name"],style:{color:"rgb(255, 203, 139)"}},{types:["tag","operator","keyword"],style:{color:"rgb(127, 219, 202)"}},{types:["boolean"],style:{color:"rgb(255, 88, 116)"}},{types:["property"],style:{color:"rgb(128, 203, 196)"}},{types:["namespace"],style:{color:"rgb(178, 204, 214)"}}]},SK=wK,EK={plain:{color:"#403f53",backgroundColor:"#FBFBFB"},styles:[{types:["changed"],style:{color:"rgb(162, 191, 252)",fontStyle:"italic"}},{types:["deleted"],style:{color:"rgba(239, 83, 80, 0.56)",fontStyle:"italic"}},{types:["inserted","attr-name"],style:{color:"rgb(72, 118, 214)",fontStyle:"italic"}},{types:["comment"],style:{color:"rgb(152, 159, 177)",fontStyle:"italic"}},{types:["string","builtin","char","constant","url"],style:{color:"rgb(72, 118, 214)"}},{types:["variable"],style:{color:"rgb(201, 103, 101)"}},{types:["number"],style:{color:"rgb(170, 9, 130)"}},{types:["punctuation"],style:{color:"rgb(153, 76, 195)"}},{types:["function","selector","doctype"],style:{color:"rgb(153, 76, 195)",fontStyle:"italic"}},{types:["class-name"],style:{color:"rgb(17, 17, 17)"}},{types:["tag"],style:{color:"rgb(153, 76, 195)"}},{types:["operator","property","keyword","namespace"],style:{color:"rgb(12, 150, 155)"}},{types:["boolean"],style:{color:"rgb(188, 84, 84)"}}]},kK=EK,Xn={char:"#D8DEE9",comment:"#999999",keyword:"#c5a5c5",primitive:"#5a9bcf",string:"#8dc891",variable:"#d7deea",boolean:"#ff8b50",tag:"#fc929e",function:"#79b6f2",className:"#FAC863"},AK={plain:{backgroundColor:"#282c34",color:"#ffffff"},styles:[{types:["attr-name"],style:{color:Xn.keyword}},{types:["attr-value"],style:{color:Xn.string}},{types:["comment","block-comment","prolog","doctype","cdata","shebang"],style:{color:Xn.comment}},{types:["property","number","function-name","constant","symbol","deleted"],style:{color:Xn.primitive}},{types:["boolean"],style:{color:Xn.boolean}},{types:["tag"],style:{color:Xn.tag}},{types:["string"],style:{color:Xn.string}},{types:["punctuation"],style:{color:Xn.string}},{types:["selector","char","builtin","inserted"],style:{color:Xn.char}},{types:["function"],style:{color:Xn.function}},{types:["operator","entity","url","variable"],style:{color:Xn.variable}},{types:["keyword"],style:{color:Xn.keyword}},{types:["atrule","class-name"],style:{color:Xn.className}},{types:["important"],style:{fontWeight:"400"}},{types:["bold"],style:{fontWeight:"bold"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["namespace"],style:{opacity:.7}}]},TK=AK,CK={plain:{color:"#f8f8f2",backgroundColor:"#272822"},styles:[{types:["changed"],style:{color:"rgb(162, 191, 252)",fontStyle:"italic"}},{types:["deleted"],style:{color:"#f92672",fontStyle:"italic"}},{types:["inserted"],style:{color:"rgb(173, 219, 103)",fontStyle:"italic"}},{types:["comment"],style:{color:"#8292a2",fontStyle:"italic"}},{types:["string","url"],style:{color:"#a6e22e"}},{types:["variable"],style:{color:"#f8f8f2"}},{types:["number"],style:{color:"#ae81ff"}},{types:["builtin","char","constant","function","class-name"],style:{color:"#e6db74"}},{types:["punctuation"],style:{color:"#f8f8f2"}},{types:["selector","doctype"],style:{color:"#a6e22e",fontStyle:"italic"}},{types:["tag","operator","keyword"],style:{color:"#66d9ef"}},{types:["boolean"],style:{color:"#ae81ff"}},{types:["namespace"],style:{color:"rgb(178, 204, 214)",opacity:.7}},{types:["tag","property"],style:{color:"#f92672"}},{types:["attr-name"],style:{color:"#a6e22e !important"}},{types:["doctype"],style:{color:"#8292a2"}},{types:["rule"],style:{color:"#e6db74"}}]},OK=CK,NK={plain:{color:"#bfc7d5",backgroundColor:"#292d3e"},styles:[{types:["comment"],style:{color:"rgb(105, 112, 152)",fontStyle:"italic"}},{types:["string","inserted"],style:{color:"rgb(195, 232, 141)"}},{types:["number"],style:{color:"rgb(247, 140, 108)"}},{types:["builtin","char","constant","function"],style:{color:"rgb(130, 170, 255)"}},{types:["punctuation","selector"],style:{color:"rgb(199, 146, 234)"}},{types:["variable"],style:{color:"rgb(191, 199, 213)"}},{types:["class-name","attr-name"],style:{color:"rgb(255, 203, 107)"}},{types:["tag","deleted"],style:{color:"rgb(255, 85, 114)"}},{types:["operator"],style:{color:"rgb(137, 221, 255)"}},{types:["boolean"],style:{color:"rgb(255, 88, 116)"}},{types:["keyword"],style:{fontStyle:"italic"}},{types:["doctype"],style:{color:"rgb(199, 146, 234)",fontStyle:"italic"}},{types:["namespace"],style:{color:"rgb(178, 204, 214)"}},{types:["url"],style:{color:"rgb(221, 221, 221)"}}]},RK=NK,jK={plain:{color:"#9EFEFF",backgroundColor:"#2D2A55"},styles:[{types:["changed"],style:{color:"rgb(255, 238, 128)"}},{types:["deleted"],style:{color:"rgba(239, 83, 80, 0.56)"}},{types:["inserted"],style:{color:"rgb(173, 219, 103)"}},{types:["comment"],style:{color:"rgb(179, 98, 255)",fontStyle:"italic"}},{types:["punctuation"],style:{color:"rgb(255, 255, 255)"}},{types:["constant"],style:{color:"rgb(255, 98, 140)"}},{types:["string","url"],style:{color:"rgb(165, 255, 144)"}},{types:["variable"],style:{color:"rgb(255, 238, 128)"}},{types:["number","boolean"],style:{color:"rgb(255, 98, 140)"}},{types:["attr-name"],style:{color:"rgb(255, 180, 84)"}},{types:["keyword","operator","property","namespace","tag","selector","doctype"],style:{color:"rgb(255, 157, 0)"}},{types:["builtin","char","constant","function","class-name"],style:{color:"rgb(250, 208, 0)"}}]},MK=jK,$K={plain:{backgroundColor:"linear-gradient(to bottom, #2a2139 75%, #34294f)",backgroundImage:"#34294f",color:"#f92aad",textShadow:"0 0 2px #100c0f, 0 0 5px #dc078e33, 0 0 10px #fff3"},styles:[{types:["comment","block-comment","prolog","doctype","cdata"],style:{color:"#495495",fontStyle:"italic"}},{types:["punctuation"],style:{color:"#ccc"}},{types:["tag","attr-name","namespace","number","unit","hexcode","deleted"],style:{color:"#e2777a"}},{types:["property","selector"],style:{color:"#72f1b8",textShadow:"0 0 2px #100c0f, 0 0 10px #257c5575, 0 0 35px #21272475"}},{types:["function-name"],style:{color:"#6196cc"}},{types:["boolean","selector-id","function"],style:{color:"#fdfdfd",textShadow:"0 0 2px #001716, 0 0 3px #03edf975, 0 0 5px #03edf975, 0 0 8px #03edf975"}},{types:["class-name","maybe-class-name","builtin"],style:{color:"#fff5f6",textShadow:"0 0 2px #000, 0 0 10px #fc1f2c75, 0 0 5px #fc1f2c75, 0 0 25px #fc1f2c75"}},{types:["constant","symbol"],style:{color:"#f92aad",textShadow:"0 0 2px #100c0f, 0 0 5px #dc078e33, 0 0 10px #fff3"}},{types:["important","atrule","keyword","selector-class"],style:{color:"#f4eee4",textShadow:"0 0 2px #393a33, 0 0 8px #f39f0575, 0 0 2px #f39f0575"}},{types:["string","char","attr-value","regex","variable"],style:{color:"#f87c32"}},{types:["parameter"],style:{fontStyle:"italic"}},{types:["entity","url"],style:{color:"#67cdcc"}},{types:["operator"],style:{color:"ffffffee"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["entity"],style:{cursor:"help"}},{types:["inserted"],style:{color:"green"}}]},DK=$K,IK={plain:{color:"#282a2e",backgroundColor:"#ffffff"},styles:[{types:["comment"],style:{color:"rgb(197, 200, 198)"}},{types:["string","number","builtin","variable"],style:{color:"rgb(150, 152, 150)"}},{types:["class-name","function","tag","attr-name"],style:{color:"rgb(40, 42, 46)"}}]},PK=IK,LK={plain:{color:"#9CDCFE",backgroundColor:"#1E1E1E"},styles:[{types:["prolog"],style:{color:"rgb(0, 0, 128)"}},{types:["comment"],style:{color:"rgb(106, 153, 85)"}},{types:["builtin","changed","keyword","interpolation-punctuation"],style:{color:"rgb(86, 156, 214)"}},{types:["number","inserted"],style:{color:"rgb(181, 206, 168)"}},{types:["constant"],style:{color:"rgb(100, 102, 149)"}},{types:["attr-name","variable"],style:{color:"rgb(156, 220, 254)"}},{types:["deleted","string","attr-value","template-punctuation"],style:{color:"rgb(206, 145, 120)"}},{types:["selector"],style:{color:"rgb(215, 186, 125)"}},{types:["tag"],style:{color:"rgb(78, 201, 176)"}},{types:["tag"],languages:["markup"],style:{color:"rgb(86, 156, 214)"}},{types:["punctuation","operator"],style:{color:"rgb(212, 212, 212)"}},{types:["punctuation"],languages:["markup"],style:{color:"#808080"}},{types:["function"],style:{color:"rgb(220, 220, 170)"}},{types:["class-name"],style:{color:"rgb(78, 201, 176)"}},{types:["char"],style:{color:"rgb(209, 105, 105)"}}]},D5=LK,zK={plain:{color:"#000000",backgroundColor:"#ffffff"},styles:[{types:["comment"],style:{color:"rgb(0, 128, 0)"}},{types:["builtin"],style:{color:"rgb(0, 112, 193)"}},{types:["number","variable","inserted"],style:{color:"rgb(9, 134, 88)"}},{types:["operator"],style:{color:"rgb(0, 0, 0)"}},{types:["constant","char"],style:{color:"rgb(129, 31, 63)"}},{types:["tag"],style:{color:"rgb(128, 0, 0)"}},{types:["attr-name"],style:{color:"rgb(255, 0, 0)"}},{types:["deleted","string"],style:{color:"rgb(163, 21, 21)"}},{types:["changed","punctuation"],style:{color:"rgb(4, 81, 165)"}},{types:["function","keyword"],style:{color:"rgb(0, 0, 255)"}},{types:["class-name"],style:{color:"rgb(38, 127, 153)"}}]},qK=zK,FK={plain:{color:"#f8fafc",backgroundColor:"#011627"},styles:[{types:["prolog"],style:{color:"#000080"}},{types:["comment"],style:{color:"#6A9955"}},{types:["builtin","changed","keyword","interpolation-punctuation"],style:{color:"#569CD6"}},{types:["number","inserted"],style:{color:"#B5CEA8"}},{types:["constant"],style:{color:"#f8fafc"}},{types:["attr-name","variable"],style:{color:"#9CDCFE"}},{types:["deleted","string","attr-value","template-punctuation"],style:{color:"#cbd5e1"}},{types:["selector"],style:{color:"#D7BA7D"}},{types:["tag"],style:{color:"#0ea5e9"}},{types:["tag"],languages:["markup"],style:{color:"#0ea5e9"}},{types:["punctuation","operator"],style:{color:"#D4D4D4"}},{types:["punctuation"],languages:["markup"],style:{color:"#808080"}},{types:["function"],style:{color:"#7dd3fc"}},{types:["class-name"],style:{color:"#0ea5e9"}},{types:["char"],style:{color:"#D16969"}}]},BK=FK,UK={plain:{color:"#0f172a",backgroundColor:"#f1f5f9"},styles:[{types:["prolog"],style:{color:"#000080"}},{types:["comment"],style:{color:"#6A9955"}},{types:["builtin","changed","keyword","interpolation-punctuation"],style:{color:"#0c4a6e"}},{types:["number","inserted"],style:{color:"#B5CEA8"}},{types:["constant"],style:{color:"#0f172a"}},{types:["attr-name","variable"],style:{color:"#0c4a6e"}},{types:["deleted","string","attr-value","template-punctuation"],style:{color:"#64748b"}},{types:["selector"],style:{color:"#D7BA7D"}},{types:["tag"],style:{color:"#0ea5e9"}},{types:["tag"],languages:["markup"],style:{color:"#0ea5e9"}},{types:["punctuation","operator"],style:{color:"#475569"}},{types:["punctuation"],languages:["markup"],style:{color:"#808080"}},{types:["function"],style:{color:"#0e7490"}},{types:["class-name"],style:{color:"#0ea5e9"}},{types:["char"],style:{color:"#D16969"}}]},VK=UK,HK={plain:{backgroundColor:"hsl(220, 13%, 18%)",color:"hsl(220, 14%, 71%)",textShadow:"0 1px rgba(0, 0, 0, 0.3)"},styles:[{types:["comment","prolog","cdata"],style:{color:"hsl(220, 10%, 40%)"}},{types:["doctype","punctuation","entity"],style:{color:"hsl(220, 14%, 71%)"}},{types:["attr-name","class-name","maybe-class-name","boolean","constant","number","atrule"],style:{color:"hsl(29, 54%, 61%)"}},{types:["keyword"],style:{color:"hsl(286, 60%, 67%)"}},{types:["property","tag","symbol","deleted","important"],style:{color:"hsl(355, 65%, 65%)"}},{types:["selector","string","char","builtin","inserted","regex","attr-value"],style:{color:"hsl(95, 38%, 62%)"}},{types:["variable","operator","function"],style:{color:"hsl(207, 82%, 66%)"}},{types:["url"],style:{color:"hsl(187, 47%, 55%)"}},{types:["deleted"],style:{textDecorationLine:"line-through"}},{types:["inserted"],style:{textDecorationLine:"underline"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["important"],style:{color:"hsl(220, 14%, 71%)"}}]},GK=HK,YK={plain:{backgroundColor:"hsl(230, 1%, 98%)",color:"hsl(230, 8%, 24%)"},styles:[{types:["comment","prolog","cdata"],style:{color:"hsl(230, 4%, 64%)"}},{types:["doctype","punctuation","entity"],style:{color:"hsl(230, 8%, 24%)"}},{types:["attr-name","class-name","boolean","constant","number","atrule"],style:{color:"hsl(35, 99%, 36%)"}},{types:["keyword"],style:{color:"hsl(301, 63%, 40%)"}},{types:["property","tag","symbol","deleted","important"],style:{color:"hsl(5, 74%, 59%)"}},{types:["selector","string","char","builtin","inserted","regex","attr-value","punctuation"],style:{color:"hsl(119, 34%, 47%)"}},{types:["variable","operator","function"],style:{color:"hsl(221, 87%, 60%)"}},{types:["url"],style:{color:"hsl(198, 99%, 37%)"}},{types:["deleted"],style:{textDecorationLine:"line-through"}},{types:["inserted"],style:{textDecorationLine:"underline"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["important"],style:{color:"hsl(230, 8%, 24%)"}}]},ZK=YK,KK={plain:{color:"#ebdbb2",backgroundColor:"#292828"},styles:[{types:["imports","class-name","maybe-class-name","constant","doctype","builtin","function"],style:{color:"#d8a657"}},{types:["property-access"],style:{color:"#7daea3"}},{types:["tag"],style:{color:"#e78a4e"}},{types:["attr-name","char","url","regex"],style:{color:"#a9b665"}},{types:["attr-value","string"],style:{color:"#89b482"}},{types:["comment","prolog","cdata","operator","inserted"],style:{color:"#a89984"}},{types:["delimiter","boolean","keyword","selector","important","atrule","property","variable","deleted"],style:{color:"#ea6962"}},{types:["entity","number","symbol"],style:{color:"#d3869b"}}]},XK=KK,WK={plain:{color:"#654735",backgroundColor:"#f9f5d7"},styles:[{types:["delimiter","boolean","keyword","selector","important","atrule","property","variable","deleted"],style:{color:"#af2528"}},{types:["imports","class-name","maybe-class-name","constant","doctype","builtin"],style:{color:"#b4730e"}},{types:["string","attr-value"],style:{color:"#477a5b"}},{types:["property-access"],style:{color:"#266b79"}},{types:["function","attr-name","char","url"],style:{color:"#72761e"}},{types:["tag"],style:{color:"#b94c07"}},{types:["comment","prolog","cdata","operator","inserted"],style:{color:"#a89984"}},{types:["entity","number","symbol"],style:{color:"#924f79"}}]},QK=WK,JK=e=>te.useCallback(t=>{var n=t,{className:r,style:i,line:a}=n,o=M5(n,["className","style","line"]);const l=kp(Xr({},o),{className:N5("token-line",r)});return typeof e=="object"&&"plain"in e&&(l.style=e.plain),typeof i=="object"&&(l.style=Xr(Xr({},l.style||{}),i)),l},[e]),eX=e=>{const t=te.useCallback(({types:n,empty:r})=>{if(e!=null){{if(n.length===1&&n[0]==="plain")return r!=null?{display:"inline-block"}:void 0;if(n.length===1&&r!=null)return e[n[0]]}return Object.assign(r!=null?{display:"inline-block"}:{},...n.map(i=>e[i]))}},[e]);return te.useCallback(n=>{var r=n,{token:i,className:a,style:o}=r,l=M5(r,["token","className","style"]);const c=kp(Xr({},l),{className:N5("token",...i.types,a),children:i.content,style:t(i)});return o!=null&&(c.style=Xr(Xr({},c.style||{}),o)),c},[t])},tX=/\r\n|\r|\n/,yO=e=>{e.length===0?e.push({types:["plain"],content:`
|
|
106
|
+
`,empty:!0}):e.length===1&&e[0].content===""&&(e[0].content=`
|
|
107
|
+
`,e[0].empty=!0)},bO=(e,t)=>{const n=e.length;return n>0&&e[n-1]===t?e:e.concat(t)},nX=e=>{const t=[[]],n=[e],r=[0],i=[e.length];let a=0,o=0,l=[];const c=[l];for(;o>-1;){for(;(a=r[o]++)<i[o];){let f,d=t[o];const m=n[o][a];if(typeof m=="string"?(d=o>0?d:["plain"],f=m):(d=bO(d,m.type),m.alias&&(d=bO(d,m.alias)),f=m.content),typeof f!="string"){o++,t.push(d),n.push(f),r.push(0),i.push(f.length);continue}const g=f.split(tX),v=g.length;l.push({types:d,content:g[0]});for(let w=1;w<v;w++)yO(l),c.push(l=[]),l.push({types:d,content:g[w]})}o--,t.pop(),n.pop(),r.pop(),i.pop()}return yO(l),c},vO=nX,rX=({prism:e,code:t,grammar:n,language:r})=>te.useMemo(()=>{if(n==null)return vO([t]);const i={code:t,grammar:n,language:r,tokens:[]};return e.hooks.run("before-tokenize",i),i.tokens=e.tokenize(t,n),e.hooks.run("after-tokenize",i),vO(i.tokens)},[t,n,r,e]),iX=(e,t)=>{const{plain:n}=e,r=e.styles.reduce((i,a)=>{const{languages:o,style:l}=a;return o&&!o.includes(t)||a.types.forEach(c=>{const f=Xr(Xr({},i[c]),l);i[c]=f}),i},{});return r.root=n,r.plain=kp(Xr({},n),{backgroundColor:void 0}),r},aX=iX,sX=({children:e,language:t,code:n,theme:r,prism:i})=>{const a=t.toLowerCase(),o=aX(r,a),l=JK(o),c=eX(o),f=i.languages[a],d=rX({prism:i,language:a,code:n,grammar:f});return e({tokens:d,className:`prism-code language-${a}`,style:o!=null?o.root:{},getLineProps:l,getTokenProps:c})},oX=e=>te.createElement(sX,kp(Xr({},e),{prism:e.prism||be,theme:e.theme||D5,code:e.code,language:e.language}));/*! Bundled license information:
|
|
108
|
+
|
|
109
|
+
prismjs/prism.js:
|
|
110
|
+
(**
|
|
111
|
+
* Prism: Lightweight, robust, elegant syntax highlighting
|
|
112
|
+
*
|
|
113
|
+
* @license MIT <https://opensource.org/licenses/MIT>
|
|
114
|
+
* @author Lea Verou <https://lea.verou.me>
|
|
115
|
+
* @namespace
|
|
116
|
+
* @public
|
|
117
|
+
*)
|
|
118
|
+
*/const _O=["border-red-400","border-blue-400","border-green-500","border-yellow-400","border-purple-400","border-pink-400","border-indigo-400"],lX=e=>{let t=0;for(let r=0;r<e.length;r++)t=e.charCodeAt(r)+((t<<5)-t);const n=Math.abs(t%_O.length);return _O[n]},uX=({message:e,client:t,getMessageContent:n,formatTokens:r,isCollapsed:i,onToggleCollapse:a})=>{const{getToolUIRender:o}=Ts(),l=o(e.name),c=lX(e.name);return N.jsxs("div",{className:"flex flex-col w-full",children:[l?l(e):N.jsxs("div",{className:`flex flex-col w-full bg-white rounded-lg shadow-sm border-2 ${c} overflow-hidden`,children:[N.jsx("div",{className:"flex items-center justify-between p-3 cursor-pointer hover:bg-gray-100 transition-colors",onClick:a,children:N.jsxs("div",{className:"text-sm font-medium text-gray-700",onClick:()=>console.log(e),children:[e.node_name," | ",e.name]})}),!i&&N.jsxs("div",{className:"flex flex-col gap-4 p-4 border-t border-gray-100",children:[N.jsx(xO,{content:e.tool_input||""}),N.jsx(xO,{content:n(e.content)}),N.jsx(Qw,{response_metadata:e.response_metadata,usage_metadata:e.usage_metadata||{},spend_time:e.spend_time,id:e.id,tool_call_id:e.tool_call_id})]})]}),e.sub_agent_messages&&N.jsx("div",{className:"flex flex-col pl-4 py-2 border-l border-gray-300",children:N.jsx(I5,{renderMessages:e.sub_agent_messages,collapsedTools:[],toggleToolCollapse:f=>{},client:t})})]})},xO=({content:e})=>{const t=()=>{try{return JSON.parse(e),!0}catch{return!1}},n=e.startsWith("{")&&e.endsWith("}")&&t(),r=e.includes("#")||e.includes("```")||e.includes("*"),[i,a]=te.useState(n),[o,l]=te.useState(!1),c=()=>{navigator.clipboard.writeText(e)};return N.jsxs("div",{className:"flex flex-col",children:[N.jsxs("div",{className:"flex gap-2 mb-2",children:[N.jsx("button",{onClick:c,className:"px-2 py-1 text-xs font-medium text-gray-600 bg-green-100 rounded hover:bg-green-200 transition-colors",children:"copy"}),n&&N.jsx("button",{onClick:()=>a(!i),className:"px-2 py-1 text-xs font-medium text-gray-600 bg-orange-100 rounded hover:bg-orange-200 transition-colors",children:"json"}),r&&N.jsx("button",{onClick:()=>l(!o),className:"px-2 py-1 text-xs font-medium text-gray-600 bg-blue-100 rounded hover:bg-blue-200 transition-colors",children:"markdown"})]}),N.jsx("div",{className:"flex flex-col max-h-[300px] overflow-auto border border-gray-200 rounded p-2 w-full text-xs font-mono whitespace-pre-wrap",children:i&&n?N.jsx(oX,{code:JSON.stringify(JSON.parse(e),null,2),language:"json",theme:$5.oneLight,children:({className:f,style:d,tokens:h,getLineProps:m,getTokenProps:g})=>N.jsx("pre",{style:d,children:h.map((v,w)=>N.jsx("div",{...m({line:v}),children:v.map((b,_)=>N.jsx("span",{...g({token:b})},_))},w))})}):o&&r?N.jsx("div",{className:"markdown-body",children:N.jsx(Y3,{remarkPlugins:[y5],children:e})}):N.jsx("pre",{className:"whitespace-pre-wrap",children:e})})]})},cX=e=>N.jsx("andypf-json-viewer",{indent:"4",expanded:"4",theme:"default-light","show-data-types":"false","show-toolbar":"false","expand-icon-type":"circle","show-copy":"true","show-size":"true",data:JSON.stringify(e.data)}),I5=({renderMessages:e,collapsedTools:t,toggleToolCollapse:n,client:r})=>{const[i,a]=te.useState(new Map),o=te.useRef(new Map),l=te.useCallback((m,g)=>{a(v=>{const w=new Map(v),b=w.get(m)||{showDetail:!1,showContextMenu:!1,contextMenuPosition:{x:0,y:0}};return w.set(m,{...b,...g}),w})},[]),c=te.useCallback((m,g)=>{m.preventDefault(),l(g,{contextMenuPosition:{x:m.clientX,y:m.clientY},showContextMenu:!0})},[l]),f=te.useCallback(m=>{l(m,{showContextMenu:!1})},[l]),d=te.useCallback((m,g)=>{navigator.clipboard.writeText(Fh(g)),f(m)},[f]),h=te.useCallback(m=>{a(g=>{const v=new Map(g),w=v.get(m);return w?v.set(m,{...w,showDetail:!w.showDetail,showContextMenu:!1}):v.set(m,{showDetail:!0,showContextMenu:!1,contextMenuPosition:{x:0,y:0}}),v})},[]);return te.useEffect(()=>{const m=g=>{i.forEach((v,w)=>{if(v.showContextMenu){const b=o.current.get(w);b&&!b.contains(g.target)&&f(w)}})};return Array.from(i.values()).some(g=>g.showContextMenu)&&document.addEventListener("click",m),()=>{document.removeEventListener("click",m)}},[i,f]),N.jsx("div",{className:"flex flex-col gap-4 w-full",children:e.map((m,g)=>{const v=m.unique_id||`message-${g}`,w=i.get(v)||{showDetail:!1,showContextMenu:!1,contextMenuPosition:{x:0,y:0}};return N.jsxs("div",{ref:b=>{b&&o.current.set(v,b)},onContextMenu:b=>c(b,v),children:[m.type==="human"?N.jsx(yq,{content:m.content}):m.type==="tool"?N.jsx(uX,{message:m,client:r,getMessageContent:Fh,formatTokens:JF,isCollapsed:t.includes(m.id),onToggleCollapse:()=>n(m.id)}):N.jsx(EZ,{message:m}),w.showDetail&&N.jsx(cX,{data:m}),w.showContextMenu&&N.jsxs("div",{className:"fixed bg-white border border-gray-200 rounded shadow-lg z-50 py-1 min-w-[150px]",style:{left:w.contextMenuPosition.x,top:w.contextMenuPosition.y},onClick:b=>b.stopPropagation(),children:[N.jsx("button",{className:"w-full bg-white px-3 py-2 text-left hover:bg-gray-50 text-sm",onClick:()=>d(v,m.content),children:"复制消息内容"}),N.jsx("button",{className:"w-full bg-white px-3 py-2 text-left hover:bg-gray-50 text-sm",onClick:()=>h(v),children:w.showDetail?"隐藏详情":"显示详情"})]})]},v)})})};/**
|
|
119
|
+
* @license lucide-react v0.544.0 - ISC
|
|
120
|
+
*
|
|
121
|
+
* This source code is licensed under the ISC license.
|
|
122
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
123
|
+
*/const fX=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),dX=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase()),wO=e=>{const t=dX(e);return t.charAt(0).toUpperCase()+t.slice(1)},P5=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim(),hX=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};/**
|
|
124
|
+
* @license lucide-react v0.544.0 - ISC
|
|
125
|
+
*
|
|
126
|
+
* This source code is licensed under the ISC license.
|
|
127
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
128
|
+
*/var pX={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
|
129
|
+
* @license lucide-react v0.544.0 - ISC
|
|
130
|
+
*
|
|
131
|
+
* This source code is licensed under the ISC license.
|
|
132
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
133
|
+
*/const mX=te.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i="",children:a,iconNode:o,...l},c)=>te.createElement("svg",{ref:c,...pX,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:P5("lucide",i),...!a&&!hX(l)&&{"aria-hidden":"true"},...l},[...o.map(([f,d])=>te.createElement(f,d)),...Array.isArray(a)?a:[a]]));/**
|
|
134
|
+
* @license lucide-react v0.544.0 - ISC
|
|
135
|
+
*
|
|
136
|
+
* This source code is licensed under the ISC license.
|
|
137
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
138
|
+
*/const Fn=(e,t)=>{const n=te.forwardRef(({className:r,...i},a)=>te.createElement(mX,{ref:a,iconNode:t,className:P5(`lucide-${fX(wO(e))}`,`lucide-${e}`,r),...i}));return n.displayName=wO(e),n};/**
|
|
139
|
+
* @license lucide-react v0.544.0 - ISC
|
|
140
|
+
*
|
|
141
|
+
* This source code is licensed under the ISC license.
|
|
142
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
143
|
+
*/const gX=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],L5=Fn("chevron-down",gX);/**
|
|
144
|
+
* @license lucide-react v0.544.0 - ISC
|
|
145
|
+
*
|
|
146
|
+
* This source code is licensed under the ISC license.
|
|
147
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
148
|
+
*/const yX=[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],bX=Fn("eye-off",yX);/**
|
|
149
|
+
* @license lucide-react v0.544.0 - ISC
|
|
150
|
+
*
|
|
151
|
+
* This source code is licensed under the ISC license.
|
|
152
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
153
|
+
*/const vX=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],_X=Fn("eye",vX);/**
|
|
154
|
+
* @license lucide-react v0.544.0 - ISC
|
|
155
|
+
*
|
|
156
|
+
* This source code is licensed under the ISC license.
|
|
157
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
158
|
+
*/const xX=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 12a1 1 0 0 0-1 1v1a1 1 0 0 1-1 1 1 1 0 0 1 1 1v1a1 1 0 0 0 1 1",key:"1oajmo"}],["path",{d:"M14 18a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1 1 1 0 0 1-1-1v-1a1 1 0 0 0-1-1",key:"mpwhp6"}]],wX=Fn("file-json",xX);/**
|
|
159
|
+
* @license lucide-react v0.544.0 - ISC
|
|
160
|
+
*
|
|
161
|
+
* This source code is licensed under the ISC license.
|
|
162
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
163
|
+
*/const SX=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],EX=Fn("file-text",SX);/**
|
|
164
|
+
* @license lucide-react v0.544.0 - ISC
|
|
165
|
+
*
|
|
166
|
+
* This source code is licensed under the ISC license.
|
|
167
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
168
|
+
*/const kX=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}]],AX=Fn("file",kX);/**
|
|
169
|
+
* @license lucide-react v0.544.0 - ISC
|
|
170
|
+
*
|
|
171
|
+
* This source code is licensed under the ISC license.
|
|
172
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
173
|
+
*/const TX=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]],CX=Fn("history",TX);/**
|
|
174
|
+
* @license lucide-react v0.544.0 - ISC
|
|
175
|
+
*
|
|
176
|
+
* This source code is licensed under the ISC license.
|
|
177
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
178
|
+
*/const OX=[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]],NX=Fn("log-out",OX);/**
|
|
179
|
+
* @license lucide-react v0.544.0 - ISC
|
|
180
|
+
*
|
|
181
|
+
* This source code is licensed under the ISC license.
|
|
182
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
183
|
+
*/const RX=[["rect",{x:"16",y:"16",width:"6",height:"6",rx:"1",key:"4q2zg0"}],["rect",{x:"2",y:"16",width:"6",height:"6",rx:"1",key:"8cvhb9"}],["rect",{x:"9",y:"2",width:"6",height:"6",rx:"1",key:"1egb70"}],["path",{d:"M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3",key:"1jsf9p"}],["path",{d:"M12 12V8",key:"2874zd"}]],jX=Fn("network",RX);/**
|
|
184
|
+
* @license lucide-react v0.544.0 - ISC
|
|
185
|
+
*
|
|
186
|
+
* This source code is licensed under the ISC license.
|
|
187
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
188
|
+
*/const MX=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],$X=Fn("plus",MX);/**
|
|
189
|
+
* @license lucide-react v0.544.0 - ISC
|
|
190
|
+
*
|
|
191
|
+
* This source code is licensed under the ISC license.
|
|
192
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
193
|
+
*/const DX=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],IX=Fn("refresh-cw",DX);/**
|
|
194
|
+
* @license lucide-react v0.544.0 - ISC
|
|
195
|
+
*
|
|
196
|
+
* This source code is licensed under the ISC license.
|
|
197
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
198
|
+
*/const PX=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]],LX=Fn("rotate-ccw",PX);/**
|
|
199
|
+
* @license lucide-react v0.544.0 - ISC
|
|
200
|
+
*
|
|
201
|
+
* This source code is licensed under the ISC license.
|
|
202
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
203
|
+
*/const zX=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],qX=Fn("trash-2",zX);/**
|
|
204
|
+
* @license lucide-react v0.544.0 - ISC
|
|
205
|
+
*
|
|
206
|
+
* This source code is licensed under the ISC license.
|
|
207
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
208
|
+
*/const FX=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],z5=Fn("x",FX),BX=({onClose:e,formatTime:t})=>{const{historyList:n,currentChatId:r,refreshHistoryList:i,createNewChat:a,deleteHistoryChat:o,toHistoryChat:l}=Ts();return N.jsxs("div",{className:" bg-white rounded-lg shadow-md h-full flex flex-col border-r",children:[N.jsxs("div",{className:"p-4 border-b border-gray-200 flex justify-between items-center h-16",children:[N.jsxs("div",{className:"flex items-center gap-3",children:[N.jsx("h3",{className:"m-0 text-lg text-gray-800",children:"历史记录"}),N.jsx("button",{className:"p-1.5 text-base rounded bg-blue-100 hover:bg-blue-200 transition-all duration-200 flex items-center justify-center hover:scale-110 group",onClick:i,title:"刷新列表",children:N.jsx(IX,{className:"w-4 h-4 text-blue-600 group-hover:text-blue-700 group-hover:rotate-180 transition-all duration-300"})})]}),N.jsx("button",{className:"p-1.5 text-base rounded bg-red-100 hover:bg-red-200 transition-all duration-200 flex items-center justify-center hover:scale-110 group",onClick:e,title:"关闭",children:N.jsx(z5,{className:"w-4 h-4 text-red-600 group-hover:text-red-700"})})]}),N.jsxs("div",{className:"flex-1 overflow-y-auto p-4",children:[N.jsx("div",{className:"flex flex-col gap-3 cursor-pointer",onClick:()=>{a()},children:N.jsx("div",{className:"flex justify-between items-center p-3 rounded-lg bg-gray-50 hover:bg-gray-100 transition-colors duration-200",children:N.jsx("div",{className:"text-sm text-gray-800 truncate",children:"New Chat"})})}),n.length===0?N.jsx("div",{className:"text-center text-gray-500 py-8",children:"暂无历史记录"}):N.jsx("div",{className:"flex flex-col gap-3 mt-3",children:n.sort((c,f)=>new Date(f.created_at).getTime()-new Date(c.created_at).getTime()).map(c=>N.jsxs("div",{className:`flex justify-between items-center p-3 rounded-lg transition-colors duration-200 ${c.thread_id===r?"bg-blue-50 border border-blue-200":"bg-gray-50 hover:bg-gray-100"}`,children:[N.jsxs("div",{className:"flex-1 min-w-0 mr-2",children:[N.jsx("div",{className:"text-sm text-gray-800 mb-1 truncate max-w-[180px]",children:e7(c)}),N.jsxs("div",{className:"flex gap-3 text-xs text-gray-500",children:[N.jsx("span",{className:"truncate max-w-[100px]",children:t(new Date(c.created_at))}),N.jsx("span",{className:"truncate max-w-[60px]",children:c.status})]})]}),N.jsxs("div",{className:"flex gap-2 shrink-0",children:[N.jsx("button",{className:"p-1.5 text-base rounded bg-green-100 hover:bg-green-200 transition-all duration-200 flex items-center justify-center hover:scale-110 group",onClick:()=>{l(c)},title:"恢复对话",children:N.jsx(LX,{className:"w-4 h-4 text-green-600 group-hover:text-green-700 group-hover:-rotate-180 transition-all duration-300"})}),N.jsx("button",{className:"p-1.5 text-base rounded bg-red-100 hover:bg-red-200 transition-all duration-200 flex items-center justify-center hover:scale-110 group",onClick:async()=>{await o(c)},title:"删除对话",children:N.jsx(qX,{className:"w-4 h-4 text-red-600 group-hover:text-red-700"})})]})]},c.thread_id))})]})]})},q5=te.createContext(void 0),UX=({children:e})=>{const[t,n]=te.useState(()=>{const i=localStorage.getItem("extraParams");try{return i?JSON.parse(i):{}}catch(a){return console.error("Failed to parse extraParams from localStorage",a),{}}});te.useEffect(()=>{localStorage.setItem("extraParams",JSON.stringify(t))},[t]);const r=i=>{n(i)};return N.jsx(q5.Provider,{value:{extraParams:t,setExtraParams:r},children:e})},F5=()=>{const e=te.useContext(q5);if(e===void 0)throw new Error("useExtraParams must be used within an ExtraParamsProvider");return e};class VX{constructor(t={}){De(this,"apiUrl");this.apiUrl=t.apiUrl||""}createFormData(t,n){const r=new FormData;if(typeof t=="string"){const i=new Blob([t],{type:"text/plain"});r.append("file",i,n||"file.txt")}else r.append("file",t,n||(t instanceof File?t.name:"file"));return r}async upload(t,n={}){const i={method:"POST",body:this.createFormData(t,n.filename)};n.signal&&(i.signal=n.signal);try{const a=await fetch(`${this.apiUrl}${this.getUploadEndpoint()}`,i);if(!a.ok)throw new Error(`Upload failed with status: ${a.status}`);const o=await a.json();return this.processResponse(o)}catch(a){throw new Error(`File upload failed: ${a instanceof Error?a.message:String(a)}`)}}}class HX extends VX{constructor(t={}){super({apiUrl:t.apiUrl||"https://tmpfiles.org/api/v1"})}getUploadEndpoint(){return"/upload"}processResponse(t){var n;return(n=t.data)!=null&&n.url&&(t.data.url=t.data.url.replace("//tmpfiles.org/","//tmpfiles.org/dl/")),t}}const GX=({onFileUploaded:e})=>{const[t,n]=te.useState([]),r=new HX,i=3,a=te.useCallback(async l=>{var d;const f=Array.from(l.target.files||[]).filter(h=>h.type.startsWith("image/"));if(t.length+f.length>i){alert(`最多只能上传${i}张图片`),l.target.value="";return}n(h=>[...h,...f]);for(const h of f)try{const m=await r.upload(h);(d=m.data)!=null&&d.url&&e(m.data.url)}catch(m){console.error("Upload failed:",m)}l.target.value=""},[e,t.length]),o=te.useCallback(l=>{n(c=>c.filter((f,d)=>d!==l))},[]);return N.jsxs("div",{className:"flex gap-2 rounded-lg flex-1",children:[t.length<i&&N.jsxs("label",{className:`inline-flex items-center justify-center w-20 h-20 text-gray-500 bg-gray-100 rounded-lg cursor-pointer transition-all duration-200 hover:bg-gray-200 ${t.length===0?"w-8 h-8":""}`,children:[N.jsxs("svg",{viewBox:"0 0 24 24",width:t.length===0?"20":"32",height:t.length===0?"20":"32",fill:"currentColor",children:[N.jsx("path",{d:"M12 15.5a3.5 3.5 0 1 0 0-7 3.5 3.5 0 0 0 0 7z"}),N.jsx("path",{d:"M20 4h-3.17l-1.24-1.35A1.99 1.99 0 0 0 14.12 2H9.88c-.56 0-1.1.24-1.48.65L7.17 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm-8 13c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5z"})]}),N.jsx("input",{type:"file",accept:"image/*",multiple:!0,onChange:a,className:"hidden"})]}),N.jsx("div",{className:"flex flex-wrap gap-2",children:t.map((l,c)=>N.jsxs("div",{className:"relative w-20 h-20 rounded-lg overflow-hidden",children:[N.jsx("img",{src:URL.createObjectURL(l),alt:l.name,className:"w-full h-full object-cover border border-gray-200"}),N.jsx("button",{className:"absolute top-0.5 right-0.5 w-5 h-5 bg-black/50 text-white rounded-full flex items-center justify-center text-base leading-none hover:bg-black/70 transition-colors",onClick:()=>o(c),children:"×"})]},c))})]})},SO="json-editor-presets",EO="json-editor-active-tab",YX=({isOpen:e,initialJson:t,onClose:n,onSave:r})=>{const[i,a]=te.useState([]),[o,l]=te.useState(0),[c,f]=te.useState(""),[d,h]=te.useState(null),[m,g]=te.useState(null),[v,w]=te.useState("");if(te.useEffect(()=>{if(e){let k=[];try{const O=localStorage.getItem(SO);k=O?JSON.parse(O):[]}catch(O){console.error("Failed to parse presets from localStorage",O),k=[]}k.length===0&&(k=[{name:"Default",data:t}]),a(k);let T=0;try{const O=localStorage.getItem(EO);if(O){const $=parseInt(O,10);$>=0&&$<k.length&&(T=$)}}catch(O){console.error("Failed to parse active tab from localStorage",O)}l(T),h(null)}},[e,t]),te.useEffect(()=>{e&&i.length>0&&i[o]&&(f(JSON.stringify(i[o].data,null,2)),h(null))},[o,i,e]),te.useEffect(()=>{e&&localStorage.setItem(EO,o.toString())},[o,e]),!e)return null;const b=k=>{a(k),localStorage.setItem(SO,JSON.stringify(k))},_=()=>{const k={name:`Preset ${i.length+1}`,data:{}},T=[...i,k];b(T),l(T.length-1)},S=k=>{let T=i.filter((O,$)=>$!==k);T.length===0&&(T=[{name:"Default",data:t}]),b(T),o>=k&&o>0?l(o-1):o>=T.length&&l(T.length-1)},x=()=>{try{const k=JSON.parse(c),T=i.map((O,$)=>$===o?{...O,data:k}:O);b(T),r(k),n()}catch(k){h("JSON 格式无效,请检查后重试。"),console.error("Invalid JSON format:",k)}},A=k=>{if(v.trim()!==""){const T=i.map((O,$)=>$===k?{...O,name:v.trim()}:O);b(T),g(null)}};return N.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",children:N.jsxs("div",{className:"bg-white rounded-lg shadow-xl w-full max-w-2xl mx-4 flex flex-col",style:{height:"80vh"},children:[N.jsx("div",{className:"p-6 border-b border-gray-200",children:N.jsx("h2",{className:"text-xl font-semibold text-gray-900",children:"编辑 Extra Parameters"})}),N.jsxs("div",{className:"flex-grow p-6 overflow-y-auto",children:[N.jsxs("div",{className:"flex items-center border-b border-gray-200 mb-4",children:[i.map((k,T)=>N.jsxs("div",{className:`flex items-center px-4 py-2 border-b-2 cursor-pointer text-sm font-medium ${o===T?"border-blue-500 text-blue-600":"border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300"}`,onDoubleClick:()=>{g(T),w(k.name)},onClick:()=>l(T),children:[m===T?N.jsx("input",{type:"text",value:v,onChange:O=>w(O.target.value),onBlur:()=>A(T),onKeyDown:O=>O.key==="Enter"&&A(T),className:"text-sm p-0 border-none focus:ring-0 bg-transparent",autoFocus:!0}):N.jsx("span",{children:k.name}),N.jsx("button",{onClick:O=>{O.stopPropagation(),S(T)},className:"ml-2 text-gray-400 hover:text-gray-600 w-4 h-4 flex items-center justify-center",children:"×"})]},T)),N.jsx("button",{onClick:_,className:"ml-2 px-3 py-1 text-sm text-gray-500 hover:text-gray-700",children:"+"})]}),N.jsx("textarea",{value:c,onChange:k=>{f(k.target.value),h(null)},className:"w-full h-full p-3 border border-gray-300 rounded-lg font-mono text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent"}),d&&N.jsx("p",{className:"mt-2 text-sm text-red-600",children:d})]}),N.jsxs("div",{className:"flex justify-end gap-3 p-6 border-t border-gray-200 bg-gray-50 rounded-b-lg",children:[N.jsx("button",{onClick:n,className:"px-4 py-2 text-sm font-medium text-gray-700 bg-white border border-gray-300 rounded-lg hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500",children:"取消"}),N.jsx("button",{onClick:x,className:"px-4 py-2 text-sm font-medium text-white bg-blue-600 rounded-lg hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500",children:"保存并使用"})]})]})})};function en(e){if(typeof e=="string"||typeof e=="number")return""+e;let t="";if(Array.isArray(e))for(let n=0,r;n<e.length;n++)(r=en(e[n]))!==""&&(t+=(t&&" ")+r);else for(let n in e)e[n]&&(t+=(t&&" ")+n);return t}var ZX={value:()=>{}};function Ap(){for(var e=0,t=arguments.length,n={},r;e<t;++e){if(!(r=arguments[e]+"")||r in n||/[\s.]/.test(r))throw new Error("illegal type: "+r);n[r]=[]}return new Eh(n)}function Eh(e){this._=e}function KX(e,t){return e.trim().split(/^|\s+/).map(function(n){var r="",i=n.indexOf(".");if(i>=0&&(r=n.slice(i+1),n=n.slice(0,i)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}Eh.prototype=Ap.prototype={constructor:Eh,on:function(e,t){var n=this._,r=KX(e+"",n),i,a=-1,o=r.length;if(arguments.length<2){for(;++a<o;)if((i=(e=r[a]).type)&&(i=XX(n[i],e.name)))return i;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++a<o;)if(i=(e=r[a]).type)n[i]=kO(n[i],e.name,t);else if(t==null)for(i in n)n[i]=kO(n[i],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new Eh(e)},call:function(e,t){if((i=arguments.length-2)>0)for(var n=new Array(i),r=0,i,a;r<i;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(a=this._[e],r=0,i=a.length;r<i;++r)a[r].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var r=this._[e],i=0,a=r.length;i<a;++i)r[i].value.apply(t,n)}};function XX(e,t){for(var n=0,r=e.length,i;n<r;++n)if((i=e[n]).name===t)return i.value}function kO(e,t,n){for(var r=0,i=e.length;r<i;++r)if(e[r].name===t){e[r]=ZX,e=e.slice(0,r).concat(e.slice(r+1));break}return n!=null&&e.push({name:t,value:n}),e}var kw="http://www.w3.org/1999/xhtml";const AO={svg:"http://www.w3.org/2000/svg",xhtml:kw,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Tp(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),AO.hasOwnProperty(t)?{space:AO[t],local:e}:e}function WX(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===kw&&t.documentElement.namespaceURI===kw?t.createElement(e):t.createElementNS(n,e)}}function QX(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function B5(e){var t=Tp(e);return(t.local?QX:WX)(t)}function JX(){}function wS(e){return e==null?JX:function(){return this.querySelector(e)}}function eW(e){typeof e!="function"&&(e=wS(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var a=t[i],o=a.length,l=r[i]=new Array(o),c,f,d=0;d<o;++d)(c=a[d])&&(f=e.call(c,c.__data__,d,a))&&("__data__"in c&&(f.__data__=c.__data__),l[d]=f);return new or(r,this._parents)}function tW(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function nW(){return[]}function U5(e){return e==null?nW:function(){return this.querySelectorAll(e)}}function rW(e){return function(){return tW(e.apply(this,arguments))}}function iW(e){typeof e=="function"?e=rW(e):e=U5(e);for(var t=this._groups,n=t.length,r=[],i=[],a=0;a<n;++a)for(var o=t[a],l=o.length,c,f=0;f<l;++f)(c=o[f])&&(r.push(e.call(c,c.__data__,f,o)),i.push(c));return new or(r,i)}function V5(e){return function(){return this.matches(e)}}function H5(e){return function(t){return t.matches(e)}}var aW=Array.prototype.find;function sW(e){return function(){return aW.call(this.children,e)}}function oW(){return this.firstElementChild}function lW(e){return this.select(e==null?oW:sW(typeof e=="function"?e:H5(e)))}var uW=Array.prototype.filter;function cW(){return Array.from(this.children)}function fW(e){return function(){return uW.call(this.children,e)}}function dW(e){return this.selectAll(e==null?cW:fW(typeof e=="function"?e:H5(e)))}function hW(e){typeof e!="function"&&(e=V5(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var a=t[i],o=a.length,l=r[i]=[],c,f=0;f<o;++f)(c=a[f])&&e.call(c,c.__data__,f,a)&&l.push(c);return new or(r,this._parents)}function G5(e){return new Array(e.length)}function pW(){return new or(this._enter||this._groups.map(G5),this._parents)}function Zh(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}Zh.prototype={constructor:Zh,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function mW(e){return function(){return e}}function gW(e,t,n,r,i,a){for(var o=0,l,c=t.length,f=a.length;o<f;++o)(l=t[o])?(l.__data__=a[o],r[o]=l):n[o]=new Zh(e,a[o]);for(;o<c;++o)(l=t[o])&&(i[o]=l)}function yW(e,t,n,r,i,a,o){var l,c,f=new Map,d=t.length,h=a.length,m=new Array(d),g;for(l=0;l<d;++l)(c=t[l])&&(m[l]=g=o.call(c,c.__data__,l,t)+"",f.has(g)?i[l]=c:f.set(g,c));for(l=0;l<h;++l)g=o.call(e,a[l],l,a)+"",(c=f.get(g))?(r[l]=c,c.__data__=a[l],f.delete(g)):n[l]=new Zh(e,a[l]);for(l=0;l<d;++l)(c=t[l])&&f.get(m[l])===c&&(i[l]=c)}function bW(e){return e.__data__}function vW(e,t){if(!arguments.length)return Array.from(this,bW);var n=t?yW:gW,r=this._parents,i=this._groups;typeof e!="function"&&(e=mW(e));for(var a=i.length,o=new Array(a),l=new Array(a),c=new Array(a),f=0;f<a;++f){var d=r[f],h=i[f],m=h.length,g=_W(e.call(d,d&&d.__data__,f,r)),v=g.length,w=l[f]=new Array(v),b=o[f]=new Array(v),_=c[f]=new Array(m);n(d,h,w,b,_,g,t);for(var S=0,x=0,A,k;S<v;++S)if(A=w[S]){for(S>=x&&(x=S+1);!(k=b[x])&&++x<v;);A._next=k||null}}return o=new or(o,r),o._enter=l,o._exit=c,o}function _W(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function xW(){return new or(this._exit||this._groups.map(G5),this._parents)}function wW(e,t,n){var r=this.enter(),i=this,a=this.exit();return typeof e=="function"?(r=e(r),r&&(r=r.selection())):r=r.append(e+""),t!=null&&(i=t(i),i&&(i=i.selection())),n==null?a.remove():n(a),r&&i?r.merge(i).order():i}function SW(e){for(var t=e.selection?e.selection():e,n=this._groups,r=t._groups,i=n.length,a=r.length,o=Math.min(i,a),l=new Array(i),c=0;c<o;++c)for(var f=n[c],d=r[c],h=f.length,m=l[c]=new Array(h),g,v=0;v<h;++v)(g=f[v]||d[v])&&(m[v]=g);for(;c<i;++c)l[c]=n[c];return new or(l,this._parents)}function EW(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var r=e[t],i=r.length-1,a=r[i],o;--i>=0;)(o=r[i])&&(a&&o.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(o,a),a=o);return this}function kW(e){e||(e=AW);function t(h,m){return h&&m?e(h.__data__,m.__data__):!h-!m}for(var n=this._groups,r=n.length,i=new Array(r),a=0;a<r;++a){for(var o=n[a],l=o.length,c=i[a]=new Array(l),f,d=0;d<l;++d)(f=o[d])&&(c[d]=f);c.sort(t)}return new or(i,this._parents).order()}function AW(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function TW(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function CW(){return Array.from(this)}function OW(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,a=r.length;i<a;++i){var o=r[i];if(o)return o}return null}function NW(){let e=0;for(const t of this)++e;return e}function RW(){return!this.node()}function jW(e){for(var t=this._groups,n=0,r=t.length;n<r;++n)for(var i=t[n],a=0,o=i.length,l;a<o;++a)(l=i[a])&&e.call(l,l.__data__,a,i);return this}function MW(e){return function(){this.removeAttribute(e)}}function $W(e){return function(){this.removeAttributeNS(e.space,e.local)}}function DW(e,t){return function(){this.setAttribute(e,t)}}function IW(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function PW(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function LW(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function zW(e,t){var n=Tp(e);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((t==null?n.local?$W:MW:typeof t=="function"?n.local?LW:PW:n.local?IW:DW)(n,t))}function Y5(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function qW(e){return function(){this.style.removeProperty(e)}}function FW(e,t,n){return function(){this.style.setProperty(e,t,n)}}function BW(e,t,n){return function(){var r=t.apply(this,arguments);r==null?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function UW(e,t,n){return arguments.length>1?this.each((t==null?qW:typeof t=="function"?BW:FW)(e,t,n??"")):Go(this.node(),e)}function Go(e,t){return e.style.getPropertyValue(t)||Y5(e).getComputedStyle(e,null).getPropertyValue(t)}function VW(e){return function(){delete this[e]}}function HW(e,t){return function(){this[e]=t}}function GW(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function YW(e,t){return arguments.length>1?this.each((t==null?VW:typeof t=="function"?GW:HW)(e,t)):this.node()[e]}function Z5(e){return e.trim().split(/^|\s+/)}function SS(e){return e.classList||new K5(e)}function K5(e){this._node=e,this._names=Z5(e.getAttribute("class")||"")}K5.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function X5(e,t){for(var n=SS(e),r=-1,i=t.length;++r<i;)n.add(t[r])}function W5(e,t){for(var n=SS(e),r=-1,i=t.length;++r<i;)n.remove(t[r])}function ZW(e){return function(){X5(this,e)}}function KW(e){return function(){W5(this,e)}}function XW(e,t){return function(){(t.apply(this,arguments)?X5:W5)(this,e)}}function WW(e,t){var n=Z5(e+"");if(arguments.length<2){for(var r=SS(this.node()),i=-1,a=n.length;++i<a;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof t=="function"?XW:t?ZW:KW)(n,t))}function QW(){this.textContent=""}function JW(e){return function(){this.textContent=e}}function eQ(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function tQ(e){return arguments.length?this.each(e==null?QW:(typeof e=="function"?eQ:JW)(e)):this.node().textContent}function nQ(){this.innerHTML=""}function rQ(e){return function(){this.innerHTML=e}}function iQ(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function aQ(e){return arguments.length?this.each(e==null?nQ:(typeof e=="function"?iQ:rQ)(e)):this.node().innerHTML}function sQ(){this.nextSibling&&this.parentNode.appendChild(this)}function oQ(){return this.each(sQ)}function lQ(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function uQ(){return this.each(lQ)}function cQ(e){var t=typeof e=="function"?e:B5(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function fQ(){return null}function dQ(e,t){var n=typeof e=="function"?e:B5(e),r=t==null?fQ:typeof t=="function"?t:wS(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function hQ(){var e=this.parentNode;e&&e.removeChild(this)}function pQ(){return this.each(hQ)}function mQ(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function gQ(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function yQ(e){return this.select(e?gQ:mQ)}function bQ(e){return arguments.length?this.property("__data__",e):this.node().__data__}function vQ(e){return function(t){e.call(this,t,this.__data__)}}function _Q(e){return e.trim().split(/^|\s+/).map(function(t){var n="",r=t.indexOf(".");return r>=0&&(n=t.slice(r+1),t=t.slice(0,r)),{type:t,name:n}})}function xQ(e){return function(){var t=this.__on;if(t){for(var n=0,r=-1,i=t.length,a;n<i;++n)a=t[n],(!e.type||a.type===e.type)&&a.name===e.name?this.removeEventListener(a.type,a.listener,a.options):t[++r]=a;++r?t.length=r:delete this.__on}}}function wQ(e,t,n){return function(){var r=this.__on,i,a=vQ(t);if(r){for(var o=0,l=r.length;o<l;++o)if((i=r[o]).type===e.type&&i.name===e.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=a,i.options=n),i.value=t;return}}this.addEventListener(e.type,a,n),i={type:e.type,name:e.name,value:t,listener:a,options:n},r?r.push(i):this.__on=[i]}}function SQ(e,t,n){var r=_Q(e+""),i,a=r.length,o;if(arguments.length<2){var l=this.node().__on;if(l){for(var c=0,f=l.length,d;c<f;++c)for(i=0,d=l[c];i<a;++i)if((o=r[i]).type===d.type&&o.name===d.name)return d.value}return}for(l=t?wQ:xQ,i=0;i<a;++i)this.each(l(r[i],t,n));return this}function Q5(e,t,n){var r=Y5(e),i=r.CustomEvent;typeof i=="function"?i=new i(t,n):(i=r.document.createEvent("Event"),n?(i.initEvent(t,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(t,!1,!1)),e.dispatchEvent(i)}function EQ(e,t){return function(){return Q5(this,e,t)}}function kQ(e,t){return function(){return Q5(this,e,t.apply(this,arguments))}}function AQ(e,t){return this.each((typeof t=="function"?kQ:EQ)(e,t))}function*TQ(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,a=r.length,o;i<a;++i)(o=r[i])&&(yield o)}var J5=[null];function or(e,t){this._groups=e,this._parents=t}function Tc(){return new or([[document.documentElement]],J5)}function CQ(){return this}or.prototype=Tc.prototype={constructor:or,select:eW,selectAll:iW,selectChild:lW,selectChildren:dW,filter:hW,data:vW,enter:pW,exit:xW,join:wW,merge:SW,selection:CQ,order:EW,sort:kW,call:TW,nodes:CW,node:OW,size:NW,empty:RW,each:jW,attr:zW,style:UW,property:YW,classed:WW,text:tQ,html:aQ,raise:oQ,lower:uQ,append:cQ,insert:dQ,remove:pQ,clone:yQ,datum:bQ,on:SQ,dispatch:AQ,[Symbol.iterator]:TQ};function er(e){return typeof e=="string"?new or([[document.querySelector(e)]],[document.documentElement]):new or([[e]],J5)}function OQ(e){let t;for(;t=e.sourceEvent;)e=t;return e}function Nr(e,t){if(e=OQ(e),t===void 0&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=e.clientX,r.y=e.clientY,r=r.matrixTransform(t.getScreenCTM().inverse()),[r.x,r.y]}if(t.getBoundingClientRect){var i=t.getBoundingClientRect();return[e.clientX-i.left-t.clientLeft,e.clientY-i.top-t.clientTop]}}return[e.pageX,e.pageY]}const NQ={passive:!1},ac={capture:!0,passive:!1};function b0(e){e.stopImmediatePropagation()}function Po(e){e.preventDefault(),e.stopImmediatePropagation()}function e9(e){var t=e.document.documentElement,n=er(e).on("dragstart.drag",Po,ac);"onselectstart"in t?n.on("selectstart.drag",Po,ac):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function t9(e,t){var n=e.document.documentElement,r=er(e).on("dragstart.drag",null);t&&(r.on("click.drag",Po,ac),setTimeout(function(){r.on("click.drag",null)},0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}const Sd=e=>()=>e;function Aw(e,{sourceEvent:t,subject:n,target:r,identifier:i,active:a,x:o,y:l,dx:c,dy:f,dispatch:d}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},identifier:{value:i,enumerable:!0,configurable:!0},active:{value:a,enumerable:!0,configurable:!0},x:{value:o,enumerable:!0,configurable:!0},y:{value:l,enumerable:!0,configurable:!0},dx:{value:c,enumerable:!0,configurable:!0},dy:{value:f,enumerable:!0,configurable:!0},_:{value:d}})}Aw.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function RQ(e){return!e.ctrlKey&&!e.button}function jQ(){return this.parentNode}function MQ(e,t){return t??{x:e.x,y:e.y}}function $Q(){return navigator.maxTouchPoints||"ontouchstart"in this}function n9(){var e=RQ,t=jQ,n=MQ,r=$Q,i={},a=Ap("start","drag","end"),o=0,l,c,f,d,h=0;function m(A){A.on("mousedown.drag",g).filter(r).on("touchstart.drag",b).on("touchmove.drag",_,NQ).on("touchend.drag touchcancel.drag",S).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function g(A,k){if(!(d||!e.call(this,A,k))){var T=x(this,t.call(this,A,k),A,k,"mouse");T&&(er(A.view).on("mousemove.drag",v,ac).on("mouseup.drag",w,ac),e9(A.view),b0(A),f=!1,l=A.clientX,c=A.clientY,T("start",A))}}function v(A){if(Po(A),!f){var k=A.clientX-l,T=A.clientY-c;f=k*k+T*T>h}i.mouse("drag",A)}function w(A){er(A.view).on("mousemove.drag mouseup.drag",null),t9(A.view,f),Po(A),i.mouse("end",A)}function b(A,k){if(e.call(this,A,k)){var T=A.changedTouches,O=t.call(this,A,k),$=T.length,L,M;for(L=0;L<$;++L)(M=x(this,O,A,k,T[L].identifier,T[L]))&&(b0(A),M("start",A,T[L]))}}function _(A){var k=A.changedTouches,T=k.length,O,$;for(O=0;O<T;++O)($=i[k[O].identifier])&&(Po(A),$("drag",A,k[O]))}function S(A){var k=A.changedTouches,T=k.length,O,$;for(d&&clearTimeout(d),d=setTimeout(function(){d=null},500),O=0;O<T;++O)($=i[k[O].identifier])&&(b0(A),$("end",A,k[O]))}function x(A,k,T,O,$,L){var M=a.copy(),z=Nr(L||T,k),P,q,D;if((D=n.call(A,new Aw("beforestart",{sourceEvent:T,target:m,identifier:$,active:o,x:z[0],y:z[1],dx:0,dy:0,dispatch:M}),O))!=null)return P=D.x-z[0]||0,q=D.y-z[1]||0,function H(B,G,K){var Q=z,R;switch(B){case"start":i[$]=H,R=o++;break;case"end":delete i[$],--o;case"drag":z=Nr(K||G,k),R=o;break}M.call(B,A,new Aw(B,{sourceEvent:G,subject:D,target:m,identifier:$,active:R,x:z[0]+P,y:z[1]+q,dx:z[0]-Q[0],dy:z[1]-Q[1],dispatch:M}),O)}}return m.filter=function(A){return arguments.length?(e=typeof A=="function"?A:Sd(!!A),m):e},m.container=function(A){return arguments.length?(t=typeof A=="function"?A:Sd(A),m):t},m.subject=function(A){return arguments.length?(n=typeof A=="function"?A:Sd(A),m):n},m.touchable=function(A){return arguments.length?(r=typeof A=="function"?A:Sd(!!A),m):r},m.on=function(){var A=a.on.apply(a,arguments);return A===a?m:A},m.clickDistance=function(A){return arguments.length?(h=(A=+A)*A,m):Math.sqrt(h)},m}function ES(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function r9(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Cc(){}var sc=.7,Kh=1/sc,Lo="\\s*([+-]?\\d+)\\s*",oc="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Wr="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",DQ=/^#([0-9a-f]{3,8})$/,IQ=new RegExp(`^rgb\\(${Lo},${Lo},${Lo}\\)$`),PQ=new RegExp(`^rgb\\(${Wr},${Wr},${Wr}\\)$`),LQ=new RegExp(`^rgba\\(${Lo},${Lo},${Lo},${oc}\\)$`),zQ=new RegExp(`^rgba\\(${Wr},${Wr},${Wr},${oc}\\)$`),qQ=new RegExp(`^hsl\\(${oc},${Wr},${Wr}\\)$`),FQ=new RegExp(`^hsla\\(${oc},${Wr},${Wr},${oc}\\)$`),TO={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};ES(Cc,lc,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:CO,formatHex:CO,formatHex8:BQ,formatHsl:UQ,formatRgb:OO,toString:OO});function CO(){return this.rgb().formatHex()}function BQ(){return this.rgb().formatHex8()}function UQ(){return i9(this).formatHsl()}function OO(){return this.rgb().formatRgb()}function lc(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=DQ.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?NO(t):n===3?new Ln(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?Ed(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?Ed(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=IQ.exec(e))?new Ln(t[1],t[2],t[3],1):(t=PQ.exec(e))?new Ln(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=LQ.exec(e))?Ed(t[1],t[2],t[3],t[4]):(t=zQ.exec(e))?Ed(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=qQ.exec(e))?MO(t[1],t[2]/100,t[3]/100,1):(t=FQ.exec(e))?MO(t[1],t[2]/100,t[3]/100,t[4]):TO.hasOwnProperty(e)?NO(TO[e]):e==="transparent"?new Ln(NaN,NaN,NaN,0):null}function NO(e){return new Ln(e>>16&255,e>>8&255,e&255,1)}function Ed(e,t,n,r){return r<=0&&(e=t=n=NaN),new Ln(e,t,n,r)}function VQ(e){return e instanceof Cc||(e=lc(e)),e?(e=e.rgb(),new Ln(e.r,e.g,e.b,e.opacity)):new Ln}function Tw(e,t,n,r){return arguments.length===1?VQ(e):new Ln(e,t,n,r??1)}function Ln(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}ES(Ln,Tw,r9(Cc,{brighter(e){return e=e==null?Kh:Math.pow(Kh,e),new Ln(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?sc:Math.pow(sc,e),new Ln(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Ln(ys(this.r),ys(this.g),ys(this.b),Xh(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:RO,formatHex:RO,formatHex8:HQ,formatRgb:jO,toString:jO}));function RO(){return`#${ps(this.r)}${ps(this.g)}${ps(this.b)}`}function HQ(){return`#${ps(this.r)}${ps(this.g)}${ps(this.b)}${ps((isNaN(this.opacity)?1:this.opacity)*255)}`}function jO(){const e=Xh(this.opacity);return`${e===1?"rgb(":"rgba("}${ys(this.r)}, ${ys(this.g)}, ${ys(this.b)}${e===1?")":`, ${e})`}`}function Xh(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function ys(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function ps(e){return e=ys(e),(e<16?"0":"")+e.toString(16)}function MO(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Rr(e,t,n,r)}function i9(e){if(e instanceof Rr)return new Rr(e.h,e.s,e.l,e.opacity);if(e instanceof Cc||(e=lc(e)),!e)return new Rr;if(e instanceof Rr)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),a=Math.max(t,n,r),o=NaN,l=a-i,c=(a+i)/2;return l?(t===a?o=(n-r)/l+(n<r)*6:n===a?o=(r-t)/l+2:o=(t-n)/l+4,l/=c<.5?a+i:2-a-i,o*=60):l=c>0&&c<1?0:o,new Rr(o,l,c,e.opacity)}function GQ(e,t,n,r){return arguments.length===1?i9(e):new Rr(e,t,n,r??1)}function Rr(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}ES(Rr,GQ,r9(Cc,{brighter(e){return e=e==null?Kh:Math.pow(Kh,e),new Rr(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?sc:Math.pow(sc,e),new Rr(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new Ln(v0(e>=240?e-240:e+120,i,r),v0(e,i,r),v0(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new Rr($O(this.h),kd(this.s),kd(this.l),Xh(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=Xh(this.opacity);return`${e===1?"hsl(":"hsla("}${$O(this.h)}, ${kd(this.s)*100}%, ${kd(this.l)*100}%${e===1?")":`, ${e})`}`}}));function $O(e){return e=(e||0)%360,e<0?e+360:e}function kd(e){return Math.max(0,Math.min(1,e||0))}function v0(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const a9=e=>()=>e;function YQ(e,t){return function(n){return e+n*t}}function ZQ(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function KQ(e){return(e=+e)==1?s9:function(t,n){return n-t?ZQ(t,n,e):a9(isNaN(t)?n:t)}}function s9(e,t){var n=t-e;return n?YQ(e,n):a9(isNaN(e)?t:e)}const DO=function e(t){var n=KQ(t);function r(i,a){var o=n((i=Tw(i)).r,(a=Tw(a)).r),l=n(i.g,a.g),c=n(i.b,a.b),f=s9(i.opacity,a.opacity);return function(d){return i.r=o(d),i.g=l(d),i.b=c(d),i.opacity=f(d),i+""}}return r.gamma=e,r}(1);function Ta(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}var Cw=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,_0=new RegExp(Cw.source,"g");function XQ(e){return function(){return e}}function WQ(e){return function(t){return e(t)+""}}function QQ(e,t){var n=Cw.lastIndex=_0.lastIndex=0,r,i,a,o=-1,l=[],c=[];for(e=e+"",t=t+"";(r=Cw.exec(e))&&(i=_0.exec(t));)(a=i.index)>n&&(a=t.slice(n,a),l[o]?l[o]+=a:l[++o]=a),(r=r[0])===(i=i[0])?l[o]?l[o]+=i:l[++o]=i:(l[++o]=null,c.push({i:o,x:Ta(r,i)})),n=_0.lastIndex;return n<t.length&&(a=t.slice(n),l[o]?l[o]+=a:l[++o]=a),l.length<2?c[0]?WQ(c[0].x):XQ(t):(t=c.length,function(f){for(var d=0,h;d<t;++d)l[(h=c[d]).i]=h.x(f);return l.join("")})}var IO=180/Math.PI,Ow={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function o9(e,t,n,r,i,a){var o,l,c;return(o=Math.sqrt(e*e+t*t))&&(e/=o,t/=o),(c=e*n+t*r)&&(n-=e*c,r-=t*c),(l=Math.sqrt(n*n+r*r))&&(n/=l,r/=l,c/=l),e*r<t*n&&(e=-e,t=-t,c=-c,o=-o),{translateX:i,translateY:a,rotate:Math.atan2(t,e)*IO,skewX:Math.atan(c)*IO,scaleX:o,scaleY:l}}var Ad;function JQ(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?Ow:o9(t.a,t.b,t.c,t.d,t.e,t.f)}function eJ(e){return e==null||(Ad||(Ad=document.createElementNS("http://www.w3.org/2000/svg","g")),Ad.setAttribute("transform",e),!(e=Ad.transform.baseVal.consolidate()))?Ow:(e=e.matrix,o9(e.a,e.b,e.c,e.d,e.e,e.f))}function l9(e,t,n,r){function i(f){return f.length?f.pop()+" ":""}function a(f,d,h,m,g,v){if(f!==h||d!==m){var w=g.push("translate(",null,t,null,n);v.push({i:w-4,x:Ta(f,h)},{i:w-2,x:Ta(d,m)})}else(h||m)&&g.push("translate("+h+t+m+n)}function o(f,d,h,m){f!==d?(f-d>180?d+=360:d-f>180&&(f+=360),m.push({i:h.push(i(h)+"rotate(",null,r)-2,x:Ta(f,d)})):d&&h.push(i(h)+"rotate("+d+r)}function l(f,d,h,m){f!==d?m.push({i:h.push(i(h)+"skewX(",null,r)-2,x:Ta(f,d)}):d&&h.push(i(h)+"skewX("+d+r)}function c(f,d,h,m,g,v){if(f!==h||d!==m){var w=g.push(i(g)+"scale(",null,",",null,")");v.push({i:w-4,x:Ta(f,h)},{i:w-2,x:Ta(d,m)})}else(h!==1||m!==1)&&g.push(i(g)+"scale("+h+","+m+")")}return function(f,d){var h=[],m=[];return f=e(f),d=e(d),a(f.translateX,f.translateY,d.translateX,d.translateY,h,m),o(f.rotate,d.rotate,h,m),l(f.skewX,d.skewX,h,m),c(f.scaleX,f.scaleY,d.scaleX,d.scaleY,h,m),f=d=null,function(g){for(var v=-1,w=m.length,b;++v<w;)h[(b=m[v]).i]=b.x(g);return h.join("")}}}var tJ=l9(JQ,"px, ","px)","deg)"),nJ=l9(eJ,", ",")",")"),rJ=1e-12;function PO(e){return((e=Math.exp(e))+1/e)/2}function iJ(e){return((e=Math.exp(e))-1/e)/2}function aJ(e){return((e=Math.exp(2*e))-1)/(e+1)}const sJ=function e(t,n,r){function i(a,o){var l=a[0],c=a[1],f=a[2],d=o[0],h=o[1],m=o[2],g=d-l,v=h-c,w=g*g+v*v,b,_;if(w<rJ)_=Math.log(m/f)/t,b=function(O){return[l+O*g,c+O*v,f*Math.exp(t*O*_)]};else{var S=Math.sqrt(w),x=(m*m-f*f+r*w)/(2*f*n*S),A=(m*m-f*f-r*w)/(2*m*n*S),k=Math.log(Math.sqrt(x*x+1)-x),T=Math.log(Math.sqrt(A*A+1)-A);_=(T-k)/t,b=function(O){var $=O*_,L=PO(k),M=f/(n*S)*(L*aJ(t*$+k)-iJ(k));return[l+M*g,c+M*v,f*L/PO(t*$+k)]}}return b.duration=_*1e3*t/Math.SQRT2,b}return i.rho=function(a){var o=Math.max(.001,+a),l=o*o,c=l*l;return e(o,l,c)},i}(Math.SQRT2,2,4);var Yo=0,Lu=0,Tu=0,u9=1e3,Wh,zu,Qh=0,xs=0,Cp=0,uc=typeof performance=="object"&&performance.now?performance:Date,c9=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function kS(){return xs||(c9(oJ),xs=uc.now()+Cp)}function oJ(){xs=0}function Jh(){this._call=this._time=this._next=null}Jh.prototype=f9.prototype={constructor:Jh,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?kS():+n)+(t==null?0:+t),!this._next&&zu!==this&&(zu?zu._next=this:Wh=this,zu=this),this._call=e,this._time=n,Nw()},stop:function(){this._call&&(this._call=null,this._time=1/0,Nw())}};function f9(e,t,n){var r=new Jh;return r.restart(e,t,n),r}function lJ(){kS(),++Yo;for(var e=Wh,t;e;)(t=xs-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Yo}function LO(){xs=(Qh=uc.now())+Cp,Yo=Lu=0;try{lJ()}finally{Yo=0,cJ(),xs=0}}function uJ(){var e=uc.now(),t=e-Qh;t>u9&&(Cp-=t,Qh=e)}function cJ(){for(var e,t=Wh,n,r=1/0;t;)t._call?(r>t._time&&(r=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:Wh=n);zu=e,Nw(r)}function Nw(e){if(!Yo){Lu&&(Lu=clearTimeout(Lu));var t=e-xs;t>24?(e<1/0&&(Lu=setTimeout(LO,e-uc.now()-Cp)),Tu&&(Tu=clearInterval(Tu))):(Tu||(Qh=uc.now(),Tu=setInterval(uJ,u9)),Yo=1,c9(LO))}}function zO(e,t,n){var r=new Jh;return t=t==null?0:+t,r.restart(i=>{r.stop(),e(i+t)},t,n),r}var fJ=Ap("start","end","cancel","interrupt"),dJ=[],d9=0,qO=1,Rw=2,kh=3,FO=4,jw=5,Ah=6;function Op(e,t,n,r,i,a){var o=e.__transition;if(!o)e.__transition={};else if(n in o)return;hJ(e,n,{name:t,index:r,group:i,on:fJ,tween:dJ,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:d9})}function AS(e,t){var n=Pr(e,t);if(n.state>d9)throw new Error("too late; already scheduled");return n}function ti(e,t){var n=Pr(e,t);if(n.state>kh)throw new Error("too late; already running");return n}function Pr(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function hJ(e,t,n){var r=e.__transition,i;r[t]=n,n.timer=f9(a,0,n.time);function a(f){n.state=qO,n.timer.restart(o,n.delay,n.time),n.delay<=f&&o(f-n.delay)}function o(f){var d,h,m,g;if(n.state!==qO)return c();for(d in r)if(g=r[d],g.name===n.name){if(g.state===kh)return zO(o);g.state===FO?(g.state=Ah,g.timer.stop(),g.on.call("interrupt",e,e.__data__,g.index,g.group),delete r[d]):+d<t&&(g.state=Ah,g.timer.stop(),g.on.call("cancel",e,e.__data__,g.index,g.group),delete r[d])}if(zO(function(){n.state===kh&&(n.state=FO,n.timer.restart(l,n.delay,n.time),l(f))}),n.state=Rw,n.on.call("start",e,e.__data__,n.index,n.group),n.state===Rw){for(n.state=kh,i=new Array(m=n.tween.length),d=0,h=-1;d<m;++d)(g=n.tween[d].value.call(e,e.__data__,n.index,n.group))&&(i[++h]=g);i.length=h+1}}function l(f){for(var d=f<n.duration?n.ease.call(null,f/n.duration):(n.timer.restart(c),n.state=jw,1),h=-1,m=i.length;++h<m;)i[h].call(e,d);n.state===jw&&(n.on.call("end",e,e.__data__,n.index,n.group),c())}function c(){n.state=Ah,n.timer.stop(),delete r[t];for(var f in r)return;delete e.__transition}}function Th(e,t){var n=e.__transition,r,i,a=!0,o;if(n){t=t==null?null:t+"";for(o in n){if((r=n[o]).name!==t){a=!1;continue}i=r.state>Rw&&r.state<jw,r.state=Ah,r.timer.stop(),r.on.call(i?"interrupt":"cancel",e,e.__data__,r.index,r.group),delete n[o]}a&&delete e.__transition}}function pJ(e){return this.each(function(){Th(this,e)})}function mJ(e,t){var n,r;return function(){var i=ti(this,e),a=i.tween;if(a!==n){r=n=a;for(var o=0,l=r.length;o<l;++o)if(r[o].name===t){r=r.slice(),r.splice(o,1);break}}i.tween=r}}function gJ(e,t,n){var r,i;if(typeof n!="function")throw new Error;return function(){var a=ti(this,e),o=a.tween;if(o!==r){i=(r=o).slice();for(var l={name:t,value:n},c=0,f=i.length;c<f;++c)if(i[c].name===t){i[c]=l;break}c===f&&i.push(l)}a.tween=i}}function yJ(e,t){var n=this._id;if(e+="",arguments.length<2){for(var r=Pr(this.node(),n).tween,i=0,a=r.length,o;i<a;++i)if((o=r[i]).name===e)return o.value;return null}return this.each((t==null?mJ:gJ)(n,e,t))}function TS(e,t,n){var r=e._id;return e.each(function(){var i=ti(this,r);(i.value||(i.value={}))[t]=n.apply(this,arguments)}),function(i){return Pr(i,r).value[t]}}function h9(e,t){var n;return(typeof t=="number"?Ta:t instanceof lc?DO:(n=lc(t))?(t=n,DO):QQ)(e,t)}function bJ(e){return function(){this.removeAttribute(e)}}function vJ(e){return function(){this.removeAttributeNS(e.space,e.local)}}function _J(e,t,n){var r,i=n+"",a;return function(){var o=this.getAttribute(e);return o===i?null:o===r?a:a=t(r=o,n)}}function xJ(e,t,n){var r,i=n+"",a;return function(){var o=this.getAttributeNS(e.space,e.local);return o===i?null:o===r?a:a=t(r=o,n)}}function wJ(e,t,n){var r,i,a;return function(){var o,l=n(this),c;return l==null?void this.removeAttribute(e):(o=this.getAttribute(e),c=l+"",o===c?null:o===r&&c===i?a:(i=c,a=t(r=o,l)))}}function SJ(e,t,n){var r,i,a;return function(){var o,l=n(this),c;return l==null?void this.removeAttributeNS(e.space,e.local):(o=this.getAttributeNS(e.space,e.local),c=l+"",o===c?null:o===r&&c===i?a:(i=c,a=t(r=o,l)))}}function EJ(e,t){var n=Tp(e),r=n==="transform"?nJ:h9;return this.attrTween(e,typeof t=="function"?(n.local?SJ:wJ)(n,r,TS(this,"attr."+e,t)):t==null?(n.local?vJ:bJ)(n):(n.local?xJ:_J)(n,r,t))}function kJ(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function AJ(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function TJ(e,t){var n,r;function i(){var a=t.apply(this,arguments);return a!==r&&(n=(r=a)&&AJ(e,a)),n}return i._value=t,i}function CJ(e,t){var n,r;function i(){var a=t.apply(this,arguments);return a!==r&&(n=(r=a)&&kJ(e,a)),n}return i._value=t,i}function OJ(e,t){var n="attr."+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!="function")throw new Error;var r=Tp(e);return this.tween(n,(r.local?TJ:CJ)(r,t))}function NJ(e,t){return function(){AS(this,e).delay=+t.apply(this,arguments)}}function RJ(e,t){return t=+t,function(){AS(this,e).delay=t}}function jJ(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?NJ:RJ)(t,e)):Pr(this.node(),t).delay}function MJ(e,t){return function(){ti(this,e).duration=+t.apply(this,arguments)}}function $J(e,t){return t=+t,function(){ti(this,e).duration=t}}function DJ(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?MJ:$J)(t,e)):Pr(this.node(),t).duration}function IJ(e,t){if(typeof t!="function")throw new Error;return function(){ti(this,e).ease=t}}function PJ(e){var t=this._id;return arguments.length?this.each(IJ(t,e)):Pr(this.node(),t).ease}function LJ(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!="function")throw new Error;ti(this,e).ease=n}}function zJ(e){if(typeof e!="function")throw new Error;return this.each(LJ(this._id,e))}function qJ(e){typeof e!="function"&&(e=V5(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var a=t[i],o=a.length,l=r[i]=[],c,f=0;f<o;++f)(c=a[f])&&e.call(c,c.__data__,f,a)&&l.push(c);return new $i(r,this._parents,this._name,this._id)}function FJ(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,r=t.length,i=n.length,a=Math.min(r,i),o=new Array(r),l=0;l<a;++l)for(var c=t[l],f=n[l],d=c.length,h=o[l]=new Array(d),m,g=0;g<d;++g)(m=c[g]||f[g])&&(h[g]=m);for(;l<r;++l)o[l]=t[l];return new $i(o,this._parents,this._name,this._id)}function BJ(e){return(e+"").trim().split(/^|\s+/).every(function(t){var n=t.indexOf(".");return n>=0&&(t=t.slice(0,n)),!t||t==="start"})}function UJ(e,t,n){var r,i,a=BJ(t)?AS:ti;return function(){var o=a(this,e),l=o.on;l!==r&&(i=(r=l).copy()).on(t,n),o.on=i}}function VJ(e,t){var n=this._id;return arguments.length<2?Pr(this.node(),n).on.on(e):this.each(UJ(n,e,t))}function HJ(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function GJ(){return this.on("end.remove",HJ(this._id))}function YJ(e){var t=this._name,n=this._id;typeof e!="function"&&(e=wS(e));for(var r=this._groups,i=r.length,a=new Array(i),o=0;o<i;++o)for(var l=r[o],c=l.length,f=a[o]=new Array(c),d,h,m=0;m<c;++m)(d=l[m])&&(h=e.call(d,d.__data__,m,l))&&("__data__"in d&&(h.__data__=d.__data__),f[m]=h,Op(f[m],t,n,m,f,Pr(d,n)));return new $i(a,this._parents,t,n)}function ZJ(e){var t=this._name,n=this._id;typeof e!="function"&&(e=U5(e));for(var r=this._groups,i=r.length,a=[],o=[],l=0;l<i;++l)for(var c=r[l],f=c.length,d,h=0;h<f;++h)if(d=c[h]){for(var m=e.call(d,d.__data__,h,c),g,v=Pr(d,n),w=0,b=m.length;w<b;++w)(g=m[w])&&Op(g,t,n,w,m,v);a.push(m),o.push(d)}return new $i(a,o,t,n)}var KJ=Tc.prototype.constructor;function XJ(){return new KJ(this._groups,this._parents)}function WJ(e,t){var n,r,i;return function(){var a=Go(this,e),o=(this.style.removeProperty(e),Go(this,e));return a===o?null:a===n&&o===r?i:i=t(n=a,r=o)}}function p9(e){return function(){this.style.removeProperty(e)}}function QJ(e,t,n){var r,i=n+"",a;return function(){var o=Go(this,e);return o===i?null:o===r?a:a=t(r=o,n)}}function JJ(e,t,n){var r,i,a;return function(){var o=Go(this,e),l=n(this),c=l+"";return l==null&&(c=l=(this.style.removeProperty(e),Go(this,e))),o===c?null:o===r&&c===i?a:(i=c,a=t(r=o,l))}}function eee(e,t){var n,r,i,a="style."+t,o="end."+a,l;return function(){var c=ti(this,e),f=c.on,d=c.value[a]==null?l||(l=p9(t)):void 0;(f!==n||i!==d)&&(r=(n=f).copy()).on(o,i=d),c.on=r}}function tee(e,t,n){var r=(e+="")=="transform"?tJ:h9;return t==null?this.styleTween(e,WJ(e,r)).on("end.style."+e,p9(e)):typeof t=="function"?this.styleTween(e,JJ(e,r,TS(this,"style."+e,t))).each(eee(this._id,e)):this.styleTween(e,QJ(e,r,t),n).on("end.style."+e,null)}function nee(e,t,n){return function(r){this.style.setProperty(e,t.call(this,r),n)}}function ree(e,t,n){var r,i;function a(){var o=t.apply(this,arguments);return o!==i&&(r=(i=o)&&nee(e,o,n)),r}return a._value=t,a}function iee(e,t,n){var r="style."+(e+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!="function")throw new Error;return this.tween(r,ree(e,t,n??""))}function aee(e){return function(){this.textContent=e}}function see(e){return function(){var t=e(this);this.textContent=t??""}}function oee(e){return this.tween("text",typeof e=="function"?see(TS(this,"text",e)):aee(e==null?"":e+""))}function lee(e){return function(t){this.textContent=e.call(this,t)}}function uee(e){var t,n;function r(){var i=e.apply(this,arguments);return i!==n&&(t=(n=i)&&lee(i)),t}return r._value=e,r}function cee(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,uee(e))}function fee(){for(var e=this._name,t=this._id,n=m9(),r=this._groups,i=r.length,a=0;a<i;++a)for(var o=r[a],l=o.length,c,f=0;f<l;++f)if(c=o[f]){var d=Pr(c,t);Op(c,e,n,f,o,{time:d.time+d.delay+d.duration,delay:0,duration:d.duration,ease:d.ease})}return new $i(r,this._parents,e,n)}function dee(){var e,t,n=this,r=n._id,i=n.size();return new Promise(function(a,o){var l={value:o},c={value:function(){--i===0&&a()}};n.each(function(){var f=ti(this,r),d=f.on;d!==e&&(t=(e=d).copy(),t._.cancel.push(l),t._.interrupt.push(l),t._.end.push(c)),f.on=t}),i===0&&a()})}var hee=0;function $i(e,t,n,r){this._groups=e,this._parents=t,this._name=n,this._id=r}function m9(){return++hee}var Si=Tc.prototype;$i.prototype={constructor:$i,select:YJ,selectAll:ZJ,selectChild:Si.selectChild,selectChildren:Si.selectChildren,filter:qJ,merge:FJ,selection:XJ,transition:fee,call:Si.call,nodes:Si.nodes,node:Si.node,size:Si.size,empty:Si.empty,each:Si.each,on:VJ,attr:EJ,attrTween:OJ,style:tee,styleTween:iee,text:oee,textTween:cee,remove:GJ,tween:yJ,delay:jJ,duration:DJ,ease:PJ,easeVarying:zJ,end:dee,[Symbol.iterator]:Si[Symbol.iterator]};function pee(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var mee={time:null,delay:0,duration:250,ease:pee};function gee(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return n}function yee(e){var t,n;e instanceof $i?(t=e._id,e=e._name):(t=m9(),(n=mee).time=kS(),e=e==null?null:e+"");for(var r=this._groups,i=r.length,a=0;a<i;++a)for(var o=r[a],l=o.length,c,f=0;f<l;++f)(c=o[f])&&Op(c,e,t,f,o,n||gee(c,t));return new $i(r,this._parents,e,t)}Tc.prototype.interrupt=pJ;Tc.prototype.transition=yee;const Td=e=>()=>e;function bee(e,{sourceEvent:t,target:n,transform:r,dispatch:i}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:i}})}function Ci(e,t,n){this.k=e,this.x=t,this.y=n}Ci.prototype={constructor:Ci,scale:function(e){return e===1?this:new Ci(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new Ci(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var Np=new Ci(1,0,0);g9.prototype=Ci.prototype;function g9(e){for(;!e.__zoom;)if(!(e=e.parentNode))return Np;return e.__zoom}function x0(e){e.stopImmediatePropagation()}function Cu(e){e.preventDefault(),e.stopImmediatePropagation()}function vee(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function _ee(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]):[[0,0],[e.clientWidth,e.clientHeight]]}function BO(){return this.__zoom||Np}function xee(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function wee(){return navigator.maxTouchPoints||"ontouchstart"in this}function See(e,t,n){var r=e.invertX(t[0][0])-n[0][0],i=e.invertX(t[1][0])-n[1][0],a=e.invertY(t[0][1])-n[0][1],o=e.invertY(t[1][1])-n[1][1];return e.translate(i>r?(r+i)/2:Math.min(0,r)||Math.max(0,i),o>a?(a+o)/2:Math.min(0,a)||Math.max(0,o))}function y9(){var e=vee,t=_ee,n=See,r=xee,i=wee,a=[0,1/0],o=[[-1/0,-1/0],[1/0,1/0]],l=250,c=sJ,f=Ap("start","zoom","end"),d,h,m,g=500,v=150,w=0,b=10;function _(D){D.property("__zoom",BO).on("wheel.zoom",$,{passive:!1}).on("mousedown.zoom",L).on("dblclick.zoom",M).filter(i).on("touchstart.zoom",z).on("touchmove.zoom",P).on("touchend.zoom touchcancel.zoom",q).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}_.transform=function(D,H,B,G){var K=D.selection?D.selection():D;K.property("__zoom",BO),D!==K?k(D,H,B,G):K.interrupt().each(function(){T(this,arguments).event(G).start().zoom(null,typeof H=="function"?H.apply(this,arguments):H).end()})},_.scaleBy=function(D,H,B,G){_.scaleTo(D,function(){var K=this.__zoom.k,Q=typeof H=="function"?H.apply(this,arguments):H;return K*Q},B,G)},_.scaleTo=function(D,H,B,G){_.transform(D,function(){var K=t.apply(this,arguments),Q=this.__zoom,R=B==null?A(K):typeof B=="function"?B.apply(this,arguments):B,V=Q.invert(R),X=typeof H=="function"?H.apply(this,arguments):H;return n(x(S(Q,X),R,V),K,o)},B,G)},_.translateBy=function(D,H,B,G){_.transform(D,function(){return n(this.__zoom.translate(typeof H=="function"?H.apply(this,arguments):H,typeof B=="function"?B.apply(this,arguments):B),t.apply(this,arguments),o)},null,G)},_.translateTo=function(D,H,B,G,K){_.transform(D,function(){var Q=t.apply(this,arguments),R=this.__zoom,V=G==null?A(Q):typeof G=="function"?G.apply(this,arguments):G;return n(Np.translate(V[0],V[1]).scale(R.k).translate(typeof H=="function"?-H.apply(this,arguments):-H,typeof B=="function"?-B.apply(this,arguments):-B),Q,o)},G,K)};function S(D,H){return H=Math.max(a[0],Math.min(a[1],H)),H===D.k?D:new Ci(H,D.x,D.y)}function x(D,H,B){var G=H[0]-B[0]*D.k,K=H[1]-B[1]*D.k;return G===D.x&&K===D.y?D:new Ci(D.k,G,K)}function A(D){return[(+D[0][0]+ +D[1][0])/2,(+D[0][1]+ +D[1][1])/2]}function k(D,H,B,G){D.on("start.zoom",function(){T(this,arguments).event(G).start()}).on("interrupt.zoom end.zoom",function(){T(this,arguments).event(G).end()}).tween("zoom",function(){var K=this,Q=arguments,R=T(K,Q).event(G),V=t.apply(K,Q),X=B==null?A(V):typeof B=="function"?B.apply(K,Q):B,j=Math.max(V[1][0]-V[0][0],V[1][1]-V[0][1]),I=K.__zoom,U=typeof H=="function"?H.apply(K,Q):H,Y=c(I.invert(X).concat(j/I.k),U.invert(X).concat(j/U.k));return function(ne){if(ne===1)ne=U;else{var ae=Y(ne),re=j/ae[2];ne=new Ci(re,X[0]-ae[0]*re,X[1]-ae[1]*re)}R.zoom(null,ne)}})}function T(D,H,B){return!B&&D.__zooming||new O(D,H)}function O(D,H){this.that=D,this.args=H,this.active=0,this.sourceEvent=null,this.extent=t.apply(D,H),this.taps=0}O.prototype={event:function(D){return D&&(this.sourceEvent=D),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(D,H){return this.mouse&&D!=="mouse"&&(this.mouse[1]=H.invert(this.mouse[0])),this.touch0&&D!=="touch"&&(this.touch0[1]=H.invert(this.touch0[0])),this.touch1&&D!=="touch"&&(this.touch1[1]=H.invert(this.touch1[0])),this.that.__zoom=H,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(D){var H=er(this.that).datum();f.call(D,this.that,new bee(D,{sourceEvent:this.sourceEvent,target:_,transform:this.that.__zoom,dispatch:f}),H)}};function $(D,...H){if(!e.apply(this,arguments))return;var B=T(this,H).event(D),G=this.__zoom,K=Math.max(a[0],Math.min(a[1],G.k*Math.pow(2,r.apply(this,arguments)))),Q=Nr(D);if(B.wheel)(B.mouse[0][0]!==Q[0]||B.mouse[0][1]!==Q[1])&&(B.mouse[1]=G.invert(B.mouse[0]=Q)),clearTimeout(B.wheel);else{if(G.k===K)return;B.mouse=[Q,G.invert(Q)],Th(this),B.start()}Cu(D),B.wheel=setTimeout(R,v),B.zoom("mouse",n(x(S(G,K),B.mouse[0],B.mouse[1]),B.extent,o));function R(){B.wheel=null,B.end()}}function L(D,...H){if(m||!e.apply(this,arguments))return;var B=D.currentTarget,G=T(this,H,!0).event(D),K=er(D.view).on("mousemove.zoom",X,!0).on("mouseup.zoom",j,!0),Q=Nr(D,B),R=D.clientX,V=D.clientY;e9(D.view),x0(D),G.mouse=[Q,this.__zoom.invert(Q)],Th(this),G.start();function X(I){if(Cu(I),!G.moved){var U=I.clientX-R,Y=I.clientY-V;G.moved=U*U+Y*Y>w}G.event(I).zoom("mouse",n(x(G.that.__zoom,G.mouse[0]=Nr(I,B),G.mouse[1]),G.extent,o))}function j(I){K.on("mousemove.zoom mouseup.zoom",null),t9(I.view,G.moved),Cu(I),G.event(I).end()}}function M(D,...H){if(e.apply(this,arguments)){var B=this.__zoom,G=Nr(D.changedTouches?D.changedTouches[0]:D,this),K=B.invert(G),Q=B.k*(D.shiftKey?.5:2),R=n(x(S(B,Q),G,K),t.apply(this,H),o);Cu(D),l>0?er(this).transition().duration(l).call(k,R,G,D):er(this).call(_.transform,R,G,D)}}function z(D,...H){if(e.apply(this,arguments)){var B=D.touches,G=B.length,K=T(this,H,D.changedTouches.length===G).event(D),Q,R,V,X;for(x0(D),R=0;R<G;++R)V=B[R],X=Nr(V,this),X=[X,this.__zoom.invert(X),V.identifier],K.touch0?!K.touch1&&K.touch0[2]!==X[2]&&(K.touch1=X,K.taps=0):(K.touch0=X,Q=!0,K.taps=1+!!d);d&&(d=clearTimeout(d)),Q&&(K.taps<2&&(h=X[0],d=setTimeout(function(){d=null},g)),Th(this),K.start())}}function P(D,...H){if(this.__zooming){var B=T(this,H).event(D),G=D.changedTouches,K=G.length,Q,R,V,X;for(Cu(D),Q=0;Q<K;++Q)R=G[Q],V=Nr(R,this),B.touch0&&B.touch0[2]===R.identifier?B.touch0[0]=V:B.touch1&&B.touch1[2]===R.identifier&&(B.touch1[0]=V);if(R=B.that.__zoom,B.touch1){var j=B.touch0[0],I=B.touch0[1],U=B.touch1[0],Y=B.touch1[1],ne=(ne=U[0]-j[0])*ne+(ne=U[1]-j[1])*ne,ae=(ae=Y[0]-I[0])*ae+(ae=Y[1]-I[1])*ae;R=S(R,Math.sqrt(ne/ae)),V=[(j[0]+U[0])/2,(j[1]+U[1])/2],X=[(I[0]+Y[0])/2,(I[1]+Y[1])/2]}else if(B.touch0)V=B.touch0[0],X=B.touch0[1];else return;B.zoom("touch",n(x(R,V,X),B.extent,o))}}function q(D,...H){if(this.__zooming){var B=T(this,H).event(D),G=D.changedTouches,K=G.length,Q,R;for(x0(D),m&&clearTimeout(m),m=setTimeout(function(){m=null},g),Q=0;Q<K;++Q)R=G[Q],B.touch0&&B.touch0[2]===R.identifier?delete B.touch0:B.touch1&&B.touch1[2]===R.identifier&&delete B.touch1;if(B.touch1&&!B.touch0&&(B.touch0=B.touch1,delete B.touch1),B.touch0)B.touch0[1]=this.__zoom.invert(B.touch0[0]);else if(B.end(),B.taps===2&&(R=Nr(R,this),Math.hypot(h[0]-R[0],h[1]-R[1])<b)){var V=er(this).on("dblclick.zoom");V&&V.apply(this,arguments)}}}return _.wheelDelta=function(D){return arguments.length?(r=typeof D=="function"?D:Td(+D),_):r},_.filter=function(D){return arguments.length?(e=typeof D=="function"?D:Td(!!D),_):e},_.touchable=function(D){return arguments.length?(i=typeof D=="function"?D:Td(!!D),_):i},_.extent=function(D){return arguments.length?(t=typeof D=="function"?D:Td([[+D[0][0],+D[0][1]],[+D[1][0],+D[1][1]]]),_):t},_.scaleExtent=function(D){return arguments.length?(a[0]=+D[0],a[1]=+D[1],_):[a[0],a[1]]},_.translateExtent=function(D){return arguments.length?(o[0][0]=+D[0][0],o[1][0]=+D[1][0],o[0][1]=+D[0][1],o[1][1]=+D[1][1],_):[[o[0][0],o[0][1]],[o[1][0],o[1][1]]]},_.constrain=function(D){return arguments.length?(n=D,_):n},_.duration=function(D){return arguments.length?(l=+D,_):l},_.interpolate=function(D){return arguments.length?(c=D,_):c},_.on=function(){var D=f.on.apply(f,arguments);return D===f?_:D},_.clickDistance=function(D){return arguments.length?(w=(D=+D)*D,_):Math.sqrt(w)},_.tapDistance=function(D){return arguments.length?(b=+D,_):b},_}const Jr={error001:()=>"[React Flow]: Seems like you have not used zustand provider as an ancestor. Help: https://reactflow.dev/error#001",error002:()=>"It looks like you've created a new nodeTypes or edgeTypes object. If this wasn't on purpose please define the nodeTypes/edgeTypes outside of the component or memoize them.",error003:e=>`Node type "${e}" not found. Using fallback type "default".`,error004:()=>"The React Flow parent container needs a width and a height to render the graph.",error005:()=>"Only child nodes can use a parent extent.",error006:()=>"Can't create edge. An edge needs a source and a target.",error007:e=>`The old edge with id=${e} does not exist.`,error009:e=>`Marker type "${e}" doesn't exist.`,error008:(e,{id:t,sourceHandle:n,targetHandle:r})=>`Couldn't create edge for ${e} handle id: "${e==="source"?n:r}", edge id: ${t}.`,error010:()=>"Handle: No node id found. Make sure to only use a Handle inside a custom Node.",error011:e=>`Edge type "${e}" not found. Using fallback type "default".`,error012:e=>`Node with id "${e}" does not exist, it may have been removed. This can happen when a node is deleted before the "onNodeClick" handler is called.`,error013:(e="react")=>`It seems that you haven't loaded the styles. Please import '@xyflow/${e}/dist/style.css' or base.css to make sure everything is working properly.`,error014:()=>"useNodeConnections: No node ID found. Call useNodeConnections inside a custom Node or provide a node ID.",error015:()=>"It seems that you are trying to drag a node that is not initialized. Please use onNodesChange as explained in the docs."},cc=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],b9=["Enter"," ","Escape"];var Zo;(function(e){e.Strict="strict",e.Loose="loose"})(Zo||(Zo={}));var bs;(function(e){e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal"})(bs||(bs={}));var fc;(function(e){e.Partial="partial",e.Full="full"})(fc||(fc={}));const v9={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null};var Ca;(function(e){e.Bezier="default",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e.SimpleBezier="simplebezier"})(Ca||(Ca={}));var ep;(function(e){e.Arrow="arrow",e.ArrowClosed="arrowclosed"})(ep||(ep={}));var Pe;(function(e){e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom"})(Pe||(Pe={}));const UO={[Pe.Left]:Pe.Right,[Pe.Right]:Pe.Left,[Pe.Top]:Pe.Bottom,[Pe.Bottom]:Pe.Top};function _9(e){return e===null?null:e?"valid":"invalid"}const x9=e=>"id"in e&&"source"in e&&"target"in e,Eee=e=>"id"in e&&"position"in e&&!("source"in e)&&!("target"in e),CS=e=>"id"in e&&"internals"in e&&!("source"in e)&&!("target"in e),Oc=(e,t=[0,0])=>{const{width:n,height:r}=zi(e),i=e.origin??t,a=n*i[0],o=r*i[1];return{x:e.position.x-a,y:e.position.y-o}},kee=(e,t={nodeOrigin:[0,0]})=>{if(e.length===0)return{x:0,y:0,width:0,height:0};const n=e.reduce((r,i)=>{const a=typeof i=="string";let o=!t.nodeLookup&&!a?i:void 0;t.nodeLookup&&(o=a?t.nodeLookup.get(i):CS(i)?i:t.nodeLookup.get(i.id));const l=o?tp(o,t.nodeOrigin):{x:0,y:0,x2:0,y2:0};return Rp(r,l)},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return jp(n)},Nc=(e,t={})=>{if(e.size===0)return{x:0,y:0,width:0,height:0};let n={x:1/0,y:1/0,x2:-1/0,y2:-1/0};return e.forEach(r=>{if(t.filter===void 0||t.filter(r)){const i=tp(r);n=Rp(n,i)}}),jp(n)},w9=(e,t,[n,r,i]=[0,0,1],a=!1,o=!1)=>{const l={...Rc(t,[n,r,i]),width:t.width/i,height:t.height/i},c=[];for(const f of e.values()){const{measured:d,selectable:h=!0,hidden:m=!1}=f;if(o&&!h||m)continue;const g=d.width??f.width??f.initialWidth??null,v=d.height??f.height??f.initialHeight??null,w=dc(l,Xo(f)),b=(g??0)*(v??0),_=a&&w>0;(!f.internals.handleBounds||_||w>=b||f.dragging)&&c.push(f)}return c},Aee=(e,t)=>{const n=new Set;return e.forEach(r=>{n.add(r.id)}),t.filter(r=>n.has(r.source)||n.has(r.target))};function Tee(e,t){const n=new Map,r=t!=null&&t.nodes?new Set(t.nodes.map(i=>i.id)):null;return e.forEach(i=>{i.measured.width&&i.measured.height&&((t==null?void 0:t.includeHiddenNodes)||!i.hidden)&&(!r||r.has(i.id))&&n.set(i.id,i)}),n}async function Cee({nodes:e,width:t,height:n,panZoom:r,minZoom:i,maxZoom:a},o){if(e.size===0)return Promise.resolve(!0);const l=Tee(e,o),c=Nc(l),f=OS(c,t,n,(o==null?void 0:o.minZoom)??i,(o==null?void 0:o.maxZoom)??a,(o==null?void 0:o.padding)??.1);return await r.setViewport(f,{duration:o==null?void 0:o.duration}),Promise.resolve(!0)}function S9({nodeId:e,nextPosition:t,nodeLookup:n,nodeOrigin:r=[0,0],nodeExtent:i,onError:a}){const o=n.get(e),l=o.parentId?n.get(o.parentId):void 0,{x:c,y:f}=l?l.internals.positionAbsolute:{x:0,y:0},d=o.origin??r;let h=i;if(o.extent==="parent"&&!o.expandParent)if(!l)a==null||a("005",Jr.error005());else{const g=l.measured.width,v=l.measured.height;g&&v&&(h=[[c,f],[c+g,f+v]])}else l&&Wo(o.extent)&&(h=[[o.extent[0][0]+c,o.extent[0][1]+f],[o.extent[1][0]+c,o.extent[1][1]+f]]);const m=Wo(h)?ws(t,h,o.measured):t;return(o.measured.width===void 0||o.measured.height===void 0)&&(a==null||a("015",Jr.error015())),{position:{x:m.x-c+(o.measured.width??0)*d[0],y:m.y-f+(o.measured.height??0)*d[1]},positionAbsolute:m}}async function Oee({nodesToRemove:e=[],edgesToRemove:t=[],nodes:n,edges:r,onBeforeDelete:i}){const a=new Set(e.map(m=>m.id)),o=[];for(const m of n){if(m.deletable===!1)continue;const g=a.has(m.id),v=!g&&m.parentId&&o.find(w=>w.id===m.parentId);(g||v)&&o.push(m)}const l=new Set(t.map(m=>m.id)),c=r.filter(m=>m.deletable!==!1),d=Aee(o,c);for(const m of c)l.has(m.id)&&!d.find(v=>v.id===m.id)&&d.push(m);if(!i)return{edges:d,nodes:o};const h=await i({nodes:o,edges:d});return typeof h=="boolean"?h?{edges:d,nodes:o}:{edges:[],nodes:[]}:h}const Ko=(e,t=0,n=1)=>Math.min(Math.max(e,t),n),ws=(e={x:0,y:0},t,n)=>({x:Ko(e.x,t[0][0],t[1][0]-((n==null?void 0:n.width)??0)),y:Ko(e.y,t[0][1],t[1][1]-((n==null?void 0:n.height)??0))});function E9(e,t,n){const{width:r,height:i}=zi(n),{x:a,y:o}=n.internals.positionAbsolute;return ws(e,[[a,o],[a+r,o+i]],t)}const VO=(e,t,n)=>e<t?Ko(Math.abs(e-t),1,t)/t:e>n?-Ko(Math.abs(e-n),1,t)/t:0,k9=(e,t,n=15,r=40)=>{const i=VO(e.x,r,t.width-r)*n,a=VO(e.y,r,t.height-r)*n;return[i,a]},Rp=(e,t)=>({x:Math.min(e.x,t.x),y:Math.min(e.y,t.y),x2:Math.max(e.x2,t.x2),y2:Math.max(e.y2,t.y2)}),Mw=({x:e,y:t,width:n,height:r})=>({x:e,y:t,x2:e+n,y2:t+r}),jp=({x:e,y:t,x2:n,y2:r})=>({x:e,y:t,width:n-e,height:r-t}),Xo=(e,t=[0,0])=>{var i,a;const{x:n,y:r}=CS(e)?e.internals.positionAbsolute:Oc(e,t);return{x:n,y:r,width:((i=e.measured)==null?void 0:i.width)??e.width??e.initialWidth??0,height:((a=e.measured)==null?void 0:a.height)??e.height??e.initialHeight??0}},tp=(e,t=[0,0])=>{var i,a;const{x:n,y:r}=CS(e)?e.internals.positionAbsolute:Oc(e,t);return{x:n,y:r,x2:n+(((i=e.measured)==null?void 0:i.width)??e.width??e.initialWidth??0),y2:r+(((a=e.measured)==null?void 0:a.height)??e.height??e.initialHeight??0)}},A9=(e,t)=>jp(Rp(Mw(e),Mw(t))),dc=(e,t)=>{const n=Math.max(0,Math.min(e.x+e.width,t.x+t.width)-Math.max(e.x,t.x)),r=Math.max(0,Math.min(e.y+e.height,t.y+t.height)-Math.max(e.y,t.y));return Math.ceil(n*r)},HO=e=>jr(e.width)&&jr(e.height)&&jr(e.x)&&jr(e.y),jr=e=>!isNaN(e)&&isFinite(e),Nee=(e,t)=>{},Mp=(e,t=[1,1])=>({x:t[0]*Math.round(e.x/t[0]),y:t[1]*Math.round(e.y/t[1])}),Rc=({x:e,y:t},[n,r,i],a=!1,o=[1,1])=>{const l={x:(e-n)/i,y:(t-r)/i};return a?Mp(l,o):l},np=({x:e,y:t},[n,r,i])=>({x:e*i+n,y:t*i+r});function To(e,t){if(typeof e=="number")return Math.floor((t-t/(1+e))*.5);if(typeof e=="string"&&e.endsWith("px")){const n=parseFloat(e);if(!Number.isNaN(n))return Math.floor(n)}if(typeof e=="string"&&e.endsWith("%")){const n=parseFloat(e);if(!Number.isNaN(n))return Math.floor(t*n*.01)}return console.error(`[React Flow] The padding value "${e}" is invalid. Please provide a number or a string with a valid unit (px or %).`),0}function Ree(e,t,n){if(typeof e=="string"||typeof e=="number"){const r=To(e,n),i=To(e,t);return{top:r,right:i,bottom:r,left:i,x:i*2,y:r*2}}if(typeof e=="object"){const r=To(e.top??e.y??0,n),i=To(e.bottom??e.y??0,n),a=To(e.left??e.x??0,t),o=To(e.right??e.x??0,t);return{top:r,right:o,bottom:i,left:a,x:a+o,y:r+i}}return{top:0,right:0,bottom:0,left:0,x:0,y:0}}function jee(e,t,n,r,i,a){const{x:o,y:l}=np(e,[t,n,r]),{x:c,y:f}=np({x:e.x+e.width,y:e.y+e.height},[t,n,r]),d=i-c,h=a-f;return{left:Math.floor(o),top:Math.floor(l),right:Math.floor(d),bottom:Math.floor(h)}}const OS=(e,t,n,r,i,a)=>{const o=Ree(a,t,n),l=(t-o.x)/e.width,c=(n-o.y)/e.height,f=Math.min(l,c),d=Ko(f,r,i),h=e.x+e.width/2,m=e.y+e.height/2,g=t/2-h*d,v=n/2-m*d,w=jee(e,g,v,d,t,n),b={left:Math.min(w.left-o.left,0),top:Math.min(w.top-o.top,0),right:Math.min(w.right-o.right,0),bottom:Math.min(w.bottom-o.bottom,0)};return{x:g-b.left+b.right,y:v-b.top+b.bottom,zoom:d}},rp=()=>{var e;return typeof navigator<"u"&&((e=navigator==null?void 0:navigator.userAgent)==null?void 0:e.indexOf("Mac"))>=0};function Wo(e){return e!==void 0&&e!=="parent"}function zi(e){var t,n;return{width:((t=e.measured)==null?void 0:t.width)??e.width??e.initialWidth??0,height:((n=e.measured)==null?void 0:n.height)??e.height??e.initialHeight??0}}function T9(e){var t,n;return(((t=e.measured)==null?void 0:t.width)??e.width??e.initialWidth)!==void 0&&(((n=e.measured)==null?void 0:n.height)??e.height??e.initialHeight)!==void 0}function C9(e,t={width:0,height:0},n,r,i){const a={...e},o=r.get(n);if(o){const l=o.origin||i;a.x+=o.internals.positionAbsolute.x-(t.width??0)*l[0],a.y+=o.internals.positionAbsolute.y-(t.height??0)*l[1]}return a}function GO(e,t){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}function Mee(){let e,t;return{promise:new Promise((r,i)=>{e=r,t=i}),resolve:e,reject:t}}function Gu(e,{snapGrid:t=[0,0],snapToGrid:n=!1,transform:r,containerBounds:i}){const{x:a,y:o}=Ri(e),l=Rc({x:a-((i==null?void 0:i.left)??0),y:o-((i==null?void 0:i.top)??0)},r),{x:c,y:f}=n?Mp(l,t):l;return{xSnapped:c,ySnapped:f,...l}}const NS=e=>({width:e.offsetWidth,height:e.offsetHeight}),O9=e=>{var t;return((t=e==null?void 0:e.getRootNode)==null?void 0:t.call(e))||(window==null?void 0:window.document)},$ee=["INPUT","SELECT","TEXTAREA"];function N9(e){var r,i;const t=((i=(r=e.composedPath)==null?void 0:r.call(e))==null?void 0:i[0])||e.target;return(t==null?void 0:t.nodeType)!==1?!1:$ee.includes(t.nodeName)||t.hasAttribute("contenteditable")||!!t.closest(".nokey")}const R9=e=>"clientX"in e,Ri=(e,t)=>{var a,o;const n=R9(e),r=n?e.clientX:(a=e.touches)==null?void 0:a[0].clientX,i=n?e.clientY:(o=e.touches)==null?void 0:o[0].clientY;return{x:r-((t==null?void 0:t.left)??0),y:i-((t==null?void 0:t.top)??0)}},YO=(e,t,n,r,i)=>{const a=t.querySelectorAll(`.${e}`);return!a||!a.length?null:Array.from(a).map(o=>{const l=o.getBoundingClientRect();return{id:o.getAttribute("data-handleid"),type:e,nodeId:i,position:o.getAttribute("data-handlepos"),x:(l.left-n.left)/r,y:(l.top-n.top)/r,...NS(o)}})};function j9({sourceX:e,sourceY:t,targetX:n,targetY:r,sourceControlX:i,sourceControlY:a,targetControlX:o,targetControlY:l}){const c=e*.125+i*.375+o*.375+n*.125,f=t*.125+a*.375+l*.375+r*.125,d=Math.abs(c-e),h=Math.abs(f-t);return[c,f,d,h]}function Cd(e,t){return e>=0?.5*e:t*25*Math.sqrt(-e)}function ZO({pos:e,x1:t,y1:n,x2:r,y2:i,c:a}){switch(e){case Pe.Left:return[t-Cd(t-r,a),n];case Pe.Right:return[t+Cd(r-t,a),n];case Pe.Top:return[t,n-Cd(n-i,a)];case Pe.Bottom:return[t,n+Cd(i-n,a)]}}function M9({sourceX:e,sourceY:t,sourcePosition:n=Pe.Bottom,targetX:r,targetY:i,targetPosition:a=Pe.Top,curvature:o=.25}){const[l,c]=ZO({pos:n,x1:e,y1:t,x2:r,y2:i,c:o}),[f,d]=ZO({pos:a,x1:r,y1:i,x2:e,y2:t,c:o}),[h,m,g,v]=j9({sourceX:e,sourceY:t,targetX:r,targetY:i,sourceControlX:l,sourceControlY:c,targetControlX:f,targetControlY:d});return[`M${e},${t} C${l},${c} ${f},${d} ${r},${i}`,h,m,g,v]}function $9({sourceX:e,sourceY:t,targetX:n,targetY:r}){const i=Math.abs(n-e)/2,a=n<e?n+i:n-i,o=Math.abs(r-t)/2,l=r<t?r+o:r-o;return[a,l,i,o]}function Dee({sourceNode:e,targetNode:t,selected:n=!1,zIndex:r=0,elevateOnSelect:i=!1}){if(!i)return r;const a=n||t.selected||e.selected,o=Math.max(e.internals.z||0,t.internals.z||0,1e3);return r+(a?o:0)}function Iee({sourceNode:e,targetNode:t,width:n,height:r,transform:i}){const a=Rp(tp(e),tp(t));a.x===a.x2&&(a.x2+=1),a.y===a.y2&&(a.y2+=1);const o={x:-i[0]/i[2],y:-i[1]/i[2],width:n/i[2],height:r/i[2]};return dc(o,jp(a))>0}const Pee=({source:e,sourceHandle:t,target:n,targetHandle:r})=>`xy-edge__${e}${t||""}-${n}${r||""}`,Lee=(e,t)=>t.some(n=>n.source===e.source&&n.target===e.target&&(n.sourceHandle===e.sourceHandle||!n.sourceHandle&&!e.sourceHandle)&&(n.targetHandle===e.targetHandle||!n.targetHandle&&!e.targetHandle)),zee=(e,t)=>{if(!e.source||!e.target)return t;let n;return x9(e)?n={...e}:n={...e,id:Pee(e)},Lee(n,t)?t:(n.sourceHandle===null&&delete n.sourceHandle,n.targetHandle===null&&delete n.targetHandle,t.concat(n))};function D9({sourceX:e,sourceY:t,targetX:n,targetY:r}){const[i,a,o,l]=$9({sourceX:e,sourceY:t,targetX:n,targetY:r});return[`M ${e},${t}L ${n},${r}`,i,a,o,l]}const KO={[Pe.Left]:{x:-1,y:0},[Pe.Right]:{x:1,y:0},[Pe.Top]:{x:0,y:-1},[Pe.Bottom]:{x:0,y:1}},qee=({source:e,sourcePosition:t=Pe.Bottom,target:n})=>t===Pe.Left||t===Pe.Right?e.x<n.x?{x:1,y:0}:{x:-1,y:0}:e.y<n.y?{x:0,y:1}:{x:0,y:-1},XO=(e,t)=>Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2));function Fee({source:e,sourcePosition:t=Pe.Bottom,target:n,targetPosition:r=Pe.Top,center:i,offset:a}){const o=KO[t],l=KO[r],c={x:e.x+o.x*a,y:e.y+o.y*a},f={x:n.x+l.x*a,y:n.y+l.y*a},d=qee({source:c,sourcePosition:t,target:f}),h=d.x!==0?"x":"y",m=d[h];let g=[],v,w;const b={x:0,y:0},_={x:0,y:0},[S,x,A,k]=$9({sourceX:e.x,sourceY:e.y,targetX:n.x,targetY:n.y});if(o[h]*l[h]===-1){v=i.x??S,w=i.y??x;const O=[{x:v,y:c.y},{x:v,y:f.y}],$=[{x:c.x,y:w},{x:f.x,y:w}];o[h]===m?g=h==="x"?O:$:g=h==="x"?$:O}else{const O=[{x:c.x,y:f.y}],$=[{x:f.x,y:c.y}];if(h==="x"?g=o.x===m?$:O:g=o.y===m?O:$,t===r){const q=Math.abs(e[h]-n[h]);if(q<=a){const D=Math.min(a-1,a-q);o[h]===m?b[h]=(c[h]>e[h]?-1:1)*D:_[h]=(f[h]>n[h]?-1:1)*D}}if(t!==r){const q=h==="x"?"y":"x",D=o[h]===l[q],H=c[q]>f[q],B=c[q]<f[q];(o[h]===1&&(!D&&H||D&&B)||o[h]!==1&&(!D&&B||D&&H))&&(g=h==="x"?O:$)}const L={x:c.x+b.x,y:c.y+b.y},M={x:f.x+_.x,y:f.y+_.y},z=Math.max(Math.abs(L.x-g[0].x),Math.abs(M.x-g[0].x)),P=Math.max(Math.abs(L.y-g[0].y),Math.abs(M.y-g[0].y));z>=P?(v=(L.x+M.x)/2,w=g[0].y):(v=g[0].x,w=(L.y+M.y)/2)}return[[e,{x:c.x+b.x,y:c.y+b.y},...g,{x:f.x+_.x,y:f.y+_.y},n],v,w,A,k]}function Bee(e,t,n,r){const i=Math.min(XO(e,t)/2,XO(t,n)/2,r),{x:a,y:o}=t;if(e.x===a&&a===n.x||e.y===o&&o===n.y)return`L${a} ${o}`;if(e.y===o){const f=e.x<n.x?-1:1,d=e.y<n.y?1:-1;return`L ${a+i*f},${o}Q ${a},${o} ${a},${o+i*d}`}const l=e.x<n.x?1:-1,c=e.y<n.y?-1:1;return`L ${a},${o+i*c}Q ${a},${o} ${a+i*l},${o}`}function $w({sourceX:e,sourceY:t,sourcePosition:n=Pe.Bottom,targetX:r,targetY:i,targetPosition:a=Pe.Top,borderRadius:o=5,centerX:l,centerY:c,offset:f=20}){const[d,h,m,g,v]=Fee({source:{x:e,y:t},sourcePosition:n,target:{x:r,y:i},targetPosition:a,center:{x:l,y:c},offset:f});return[d.reduce((b,_,S)=>{let x="";return S>0&&S<d.length-1?x=Bee(d[S-1],_,d[S+1],o):x=`${S===0?"M":"L"}${_.x} ${_.y}`,b+=x,b},""),h,m,g,v]}function WO(e){var t;return e&&!!(e.internals.handleBounds||(t=e.handles)!=null&&t.length)&&!!(e.measured.width||e.width||e.initialWidth)}function Uee(e){var h;const{sourceNode:t,targetNode:n}=e;if(!WO(t)||!WO(n))return null;const r=t.internals.handleBounds||QO(t.handles),i=n.internals.handleBounds||QO(n.handles),a=JO((r==null?void 0:r.source)??[],e.sourceHandle),o=JO(e.connectionMode===Zo.Strict?(i==null?void 0:i.target)??[]:((i==null?void 0:i.target)??[]).concat((i==null?void 0:i.source)??[]),e.targetHandle);if(!a||!o)return(h=e.onError)==null||h.call(e,"008",Jr.error008(a?"target":"source",{id:e.id,sourceHandle:e.sourceHandle,targetHandle:e.targetHandle})),null;const l=(a==null?void 0:a.position)||Pe.Bottom,c=(o==null?void 0:o.position)||Pe.Top,f=hc(t,a,l),d=hc(n,o,c);return{sourceX:f.x,sourceY:f.y,targetX:d.x,targetY:d.y,sourcePosition:l,targetPosition:c}}function QO(e){if(!e)return null;const t=[],n=[];for(const r of e)r.width=r.width??1,r.height=r.height??1,r.type==="source"?t.push(r):r.type==="target"&&n.push(r);return{source:t,target:n}}function hc(e,t,n=Pe.Left,r=!1){const i=((t==null?void 0:t.x)??0)+e.internals.positionAbsolute.x,a=((t==null?void 0:t.y)??0)+e.internals.positionAbsolute.y,{width:o,height:l}=t??zi(e);if(r)return{x:i+o/2,y:a+l/2};switch((t==null?void 0:t.position)??n){case Pe.Top:return{x:i+o/2,y:a};case Pe.Right:return{x:i+o,y:a+l/2};case Pe.Bottom:return{x:i+o/2,y:a+l};case Pe.Left:return{x:i,y:a+l/2}}}function JO(e,t){return e&&(t?e.find(n=>n.id===t):e[0])||null}function Dw(e,t){return e?typeof e=="string"?e:`${t?`${t}__`:""}${Object.keys(e).sort().map(r=>`${r}=${e[r]}`).join("&")}`:""}function Vee(e,{id:t,defaultColor:n,defaultMarkerStart:r,defaultMarkerEnd:i}){const a=new Set;return e.reduce((o,l)=>([l.markerStart||r,l.markerEnd||i].forEach(c=>{if(c&&typeof c=="object"){const f=Dw(c,t);a.has(f)||(o.push({id:f,color:c.color||n,...c}),a.add(f))}}),o),[]).sort((o,l)=>o.id.localeCompare(l.id))}const RS={nodeOrigin:[0,0],nodeExtent:cc,elevateNodesOnSelect:!0,defaults:{}},Hee={...RS,checkEquality:!0};function jS(e,t){const n={...e};for(const r in t)t[r]!==void 0&&(n[r]=t[r]);return n}function Gee(e,t,n){const r=jS(RS,n);for(const i of e.values())if(i.parentId)MS(i,e,t,r);else{const a=Oc(i,r.nodeOrigin),o=Wo(i.extent)?i.extent:r.nodeExtent,l=ws(a,o,zi(i));i.internals.positionAbsolute=l}}function Iw(e,t,n,r){var c,f;const i=jS(Hee,r);let a=e.length>0;const o=new Map(t),l=i!=null&&i.elevateNodesOnSelect?1e3:0;t.clear(),n.clear();for(const d of e){let h=o.get(d.id);if(i.checkEquality&&d===(h==null?void 0:h.internals.userNode))t.set(d.id,h);else{const m=Oc(d,i.nodeOrigin),g=Wo(d.extent)?d.extent:i.nodeExtent,v=ws(m,g,zi(d));h={...i.defaults,...d,measured:{width:(c=d.measured)==null?void 0:c.width,height:(f=d.measured)==null?void 0:f.height},internals:{positionAbsolute:v,handleBounds:d.measured?h==null?void 0:h.internals.handleBounds:void 0,z:I9(d,l),userNode:d}},t.set(d.id,h)}(h.measured===void 0||h.measured.width===void 0||h.measured.height===void 0)&&!h.hidden&&(a=!1),d.parentId&&MS(h,t,n,r)}return a}function Yee(e,t){if(!e.parentId)return;const n=t.get(e.parentId);n?n.set(e.id,e):t.set(e.parentId,new Map([[e.id,e]]))}function MS(e,t,n,r){const{elevateNodesOnSelect:i,nodeOrigin:a,nodeExtent:o}=jS(RS,r),l=e.parentId,c=t.get(l);if(!c){console.warn(`Parent node ${l} not found. Please make sure that parent nodes are in front of their child nodes in the nodes array.`);return}Yee(e,n);const f=i?1e3:0,{x:d,y:h,z:m}=Zee(e,c,a,o,f),{positionAbsolute:g}=e.internals,v=d!==g.x||h!==g.y;(v||m!==e.internals.z)&&t.set(e.id,{...e,internals:{...e.internals,positionAbsolute:v?{x:d,y:h}:g,z:m}})}function I9(e,t){return(jr(e.zIndex)?e.zIndex:0)+(e.selected?t:0)}function Zee(e,t,n,r,i){const{x:a,y:o}=t.internals.positionAbsolute,l=zi(e),c=Oc(e,n),f=Wo(e.extent)?ws(c,e.extent,l):c;let d=ws({x:a+f.x,y:o+f.y},r,l);e.extent==="parent"&&(d=E9(d,l,t));const h=I9(e,i),m=t.internals.z??0;return{x:d.x,y:d.y,z:m>h?m:h}}function $S(e,t,n,r=[0,0]){var o;const i=[],a=new Map;for(const l of e){const c=t.get(l.parentId);if(!c)continue;const f=((o=a.get(l.parentId))==null?void 0:o.expandedRect)??Xo(c),d=A9(f,l.rect);a.set(l.parentId,{expandedRect:d,parent:c})}return a.size>0&&a.forEach(({expandedRect:l,parent:c},f)=>{var x;const d=c.internals.positionAbsolute,h=zi(c),m=c.origin??r,g=l.x<d.x?Math.round(Math.abs(d.x-l.x)):0,v=l.y<d.y?Math.round(Math.abs(d.y-l.y)):0,w=Math.max(h.width,Math.round(l.width)),b=Math.max(h.height,Math.round(l.height)),_=(w-h.width)*m[0],S=(b-h.height)*m[1];(g>0||v>0||_||S)&&(i.push({id:f,type:"position",position:{x:c.position.x-g+_,y:c.position.y-v+S}}),(x=n.get(f))==null||x.forEach(A=>{e.some(k=>k.id===A.id)||i.push({id:A.id,type:"position",position:{x:A.position.x+g,y:A.position.y+v}})})),(h.width<l.width||h.height<l.height||g||v)&&i.push({id:f,type:"dimensions",setAttributes:!0,dimensions:{width:w+(g?m[0]*g-_:0),height:b+(v?m[1]*v-S:0)}})}),i}function Kee(e,t,n,r,i,a){const o=r==null?void 0:r.querySelector(".xyflow__viewport");let l=!1;if(!o)return{changes:[],updatedInternals:l};const c=[],f=window.getComputedStyle(o),{m22:d}=new window.DOMMatrixReadOnly(f.transform),h=[];for(const m of e.values()){const g=t.get(m.id);if(!g)continue;if(g.hidden){t.set(g.id,{...g,internals:{...g.internals,handleBounds:void 0}}),l=!0;continue}const v=NS(m.nodeElement),w=g.measured.width!==v.width||g.measured.height!==v.height;if(!!(v.width&&v.height&&(w||!g.internals.handleBounds||m.force))){const _=m.nodeElement.getBoundingClientRect(),S=Wo(g.extent)?g.extent:a;let{positionAbsolute:x}=g.internals;g.parentId&&g.extent==="parent"?x=E9(x,v,t.get(g.parentId)):S&&(x=ws(x,S,v));const A={...g,measured:v,internals:{...g.internals,positionAbsolute:x,handleBounds:{source:YO("source",m.nodeElement,_,d,g.id),target:YO("target",m.nodeElement,_,d,g.id)}}};t.set(g.id,A),g.parentId&&MS(A,t,n,{nodeOrigin:i}),l=!0,w&&(c.push({id:g.id,type:"dimensions",dimensions:v}),g.expandParent&&g.parentId&&h.push({id:g.id,parentId:g.parentId,rect:Xo(A,i)}))}}if(h.length>0){const m=$S(h,t,n,i);c.push(...m)}return{changes:c,updatedInternals:l}}async function Xee({delta:e,panZoom:t,transform:n,translateExtent:r,width:i,height:a}){if(!t||!e.x&&!e.y)return Promise.resolve(!1);const o=await t.setViewportConstrained({x:n[0]+e.x,y:n[1]+e.y,zoom:n[2]},[[0,0],[i,a]],r),l=!!o&&(o.x!==n[0]||o.y!==n[1]||o.k!==n[2]);return Promise.resolve(l)}function eN(e,t,n,r,i,a){let o=i;const l=r.get(o)||new Map;r.set(o,l.set(n,t)),o=`${i}-${e}`;const c=r.get(o)||new Map;if(r.set(o,c.set(n,t)),a){o=`${i}-${e}-${a}`;const f=r.get(o)||new Map;r.set(o,f.set(n,t))}}function P9(e,t,n){e.clear(),t.clear();for(const r of n){const{source:i,target:a,sourceHandle:o=null,targetHandle:l=null}=r,c={edgeId:r.id,source:i,target:a,sourceHandle:o,targetHandle:l},f=`${i}-${o}--${a}-${l}`,d=`${a}-${l}--${i}-${o}`;eN("source",c,d,e,i,o),eN("target",c,f,e,a,l),t.set(r.id,r)}}function L9(e,t){if(!e.parentId)return!1;const n=t.get(e.parentId);return n?n.selected?!0:L9(n,t):!1}function tN(e,t,n){var i;let r=e;do{if((i=r==null?void 0:r.matches)!=null&&i.call(r,t))return!0;if(r===n)return!1;r=r==null?void 0:r.parentElement}while(r);return!1}function Wee(e,t,n,r){const i=new Map;for(const[a,o]of e)if((o.selected||o.id===r)&&(!o.parentId||!L9(o,e))&&(o.draggable||t&&typeof o.draggable>"u")){const l=e.get(a);l&&i.set(a,{id:a,position:l.position||{x:0,y:0},distance:{x:n.x-l.internals.positionAbsolute.x,y:n.y-l.internals.positionAbsolute.y},extent:l.extent,parentId:l.parentId,origin:l.origin,expandParent:l.expandParent,internals:{positionAbsolute:l.internals.positionAbsolute||{x:0,y:0}},measured:{width:l.measured.width??0,height:l.measured.height??0}})}return i}function w0({nodeId:e,dragItems:t,nodeLookup:n,dragging:r=!0}){var o,l,c;const i=[];for(const[f,d]of t){const h=(o=n.get(f))==null?void 0:o.internals.userNode;h&&i.push({...h,position:d.position,dragging:r})}if(!e)return[i[0],i];const a=(l=n.get(e))==null?void 0:l.internals.userNode;return[a?{...a,position:((c=t.get(e))==null?void 0:c.position)||a.position,dragging:r}:i[0],i]}function Qee({onNodeMouseDown:e,getStoreItems:t,onDragStart:n,onDrag:r,onDragStop:i}){let a={x:null,y:null},o=0,l=new Map,c=!1,f={x:0,y:0},d=null,h=!1,m=null,g=!1;function v({noDragClassName:b,handleSelector:_,domNode:S,isSelectable:x,nodeId:A,nodeClickDistance:k=0}){m=er(S);function T({x:M,y:z},P){const{nodeLookup:q,nodeExtent:D,snapGrid:H,snapToGrid:B,nodeOrigin:G,onNodeDrag:K,onSelectionDrag:Q,onError:R,updateNodePositions:V}=t();a={x:M,y:z};let X=!1,j={x:0,y:0,x2:0,y2:0};if(l.size>1&&D){const I=Nc(l);j=Mw(I)}for(const[I,U]of l){if(!q.has(I))continue;let Y={x:M-U.distance.x,y:z-U.distance.y};B&&(Y=Mp(Y,H));let ne=[[D[0][0],D[0][1]],[D[1][0],D[1][1]]];if(l.size>1&&D&&!U.extent){const{positionAbsolute:le}=U.internals,W=le.x-j.x+D[0][0],J=le.x+U.measured.width-j.x2+D[1][0],se=le.y-j.y+D[0][1],fe=le.y+U.measured.height-j.y2+D[1][1];ne=[[W,se],[J,fe]]}const{position:ae,positionAbsolute:re}=S9({nodeId:I,nextPosition:Y,nodeLookup:q,nodeExtent:ne,nodeOrigin:G,onError:R});X=X||U.position.x!==ae.x||U.position.y!==ae.y,U.position=ae,U.internals.positionAbsolute=re}if(X&&(V(l,!0),P&&(r||K||!A&&Q))){const[I,U]=w0({nodeId:A,dragItems:l,nodeLookup:q});r==null||r(P,l,I,U),K==null||K(P,I,U),A||Q==null||Q(P,U)}}async function O(){if(!d)return;const{transform:M,panBy:z,autoPanSpeed:P,autoPanOnNodeDrag:q}=t();if(!q){c=!1,cancelAnimationFrame(o);return}const[D,H]=k9(f,d,P);(D!==0||H!==0)&&(a.x=(a.x??0)-D/M[2],a.y=(a.y??0)-H/M[2],await z({x:D,y:H})&&T(a,null)),o=requestAnimationFrame(O)}function $(M){var X;const{nodeLookup:z,multiSelectionActive:P,nodesDraggable:q,transform:D,snapGrid:H,snapToGrid:B,selectNodesOnDrag:G,onNodeDragStart:K,onSelectionDragStart:Q,unselectNodesAndEdges:R}=t();h=!0,(!G||!x)&&!P&&A&&((X=z.get(A))!=null&&X.selected||R()),x&&G&&A&&(e==null||e(A));const V=Gu(M.sourceEvent,{transform:D,snapGrid:H,snapToGrid:B,containerBounds:d});if(a=V,l=Wee(z,q,V,A),l.size>0&&(n||K||!A&&Q)){const[j,I]=w0({nodeId:A,dragItems:l,nodeLookup:z});n==null||n(M.sourceEvent,l,j,I),K==null||K(M.sourceEvent,j,I),A||Q==null||Q(M.sourceEvent,I)}}const L=n9().clickDistance(k).on("start",M=>{const{domNode:z,nodeDragThreshold:P,transform:q,snapGrid:D,snapToGrid:H}=t();d=(z==null?void 0:z.getBoundingClientRect())||null,g=!1,P===0&&$(M),a=Gu(M.sourceEvent,{transform:q,snapGrid:D,snapToGrid:H,containerBounds:d}),f=Ri(M.sourceEvent,d)}).on("drag",M=>{const{autoPanOnNodeDrag:z,transform:P,snapGrid:q,snapToGrid:D,nodeDragThreshold:H,nodeLookup:B}=t(),G=Gu(M.sourceEvent,{transform:P,snapGrid:q,snapToGrid:D,containerBounds:d});if((M.sourceEvent.type==="touchmove"&&M.sourceEvent.touches.length>1||A&&!B.has(A))&&(g=!0),!g){if(!c&&z&&h&&(c=!0,O()),!h){const K=G.xSnapped-(a.x??0),Q=G.ySnapped-(a.y??0);Math.sqrt(K*K+Q*Q)>H&&$(M)}(a.x!==G.xSnapped||a.y!==G.ySnapped)&&l&&h&&(f=Ri(M.sourceEvent,d),T(G,M.sourceEvent))}}).on("end",M=>{if(!(!h||g)&&(c=!1,h=!1,cancelAnimationFrame(o),l.size>0)){const{nodeLookup:z,updateNodePositions:P,onNodeDragStop:q,onSelectionDragStop:D}=t();if(P(l,!1),i||q||!A&&D){const[H,B]=w0({nodeId:A,dragItems:l,nodeLookup:z,dragging:!1});i==null||i(M.sourceEvent,l,H,B),q==null||q(M.sourceEvent,H,B),A||D==null||D(M.sourceEvent,B)}}}).filter(M=>{const z=M.target;return!M.button&&(!b||!tN(z,`.${b}`,S))&&(!_||tN(z,_,S))});m.call(L)}function w(){m==null||m.on(".drag",null)}return{update:v,destroy:w}}function Jee(e,t,n){const r=[],i={x:e.x-n,y:e.y-n,width:n*2,height:n*2};for(const a of t.values())dc(i,Xo(a))>0&&r.push(a);return r}const ete=250;function tte(e,t,n,r){var l,c;let i=[],a=1/0;const o=Jee(e,n,t+ete);for(const f of o){const d=[...((l=f.internals.handleBounds)==null?void 0:l.source)??[],...((c=f.internals.handleBounds)==null?void 0:c.target)??[]];for(const h of d){if(r.nodeId===h.nodeId&&r.type===h.type&&r.id===h.id)continue;const{x:m,y:g}=hc(f,h,h.position,!0),v=Math.sqrt(Math.pow(m-e.x,2)+Math.pow(g-e.y,2));v>t||(v<a?(i=[{...h,x:m,y:g}],a=v):v===a&&i.push({...h,x:m,y:g}))}}if(!i.length)return null;if(i.length>1){const f=r.type==="source"?"target":"source";return i.find(d=>d.type===f)??i[0]}return i[0]}function z9(e,t,n,r,i,a=!1){var f,d,h;const o=r.get(e);if(!o)return null;const l=i==="strict"?(f=o.internals.handleBounds)==null?void 0:f[t]:[...((d=o.internals.handleBounds)==null?void 0:d.source)??[],...((h=o.internals.handleBounds)==null?void 0:h.target)??[]],c=(n?l==null?void 0:l.find(m=>m.id===n):l==null?void 0:l[0])??null;return c&&a?{...c,...hc(o,c,c.position,!0)}:c}function q9(e,t){return e||(t!=null&&t.classList.contains("target")?"target":t!=null&&t.classList.contains("source")?"source":null)}function nte(e,t){let n=null;return t?n=!0:e&&!t&&(n=!1),n}const F9=()=>!0;function rte(e,{connectionMode:t,connectionRadius:n,handleId:r,nodeId:i,edgeUpdaterType:a,isTarget:o,domNode:l,nodeLookup:c,lib:f,autoPanOnConnect:d,flowId:h,panBy:m,cancelConnection:g,onConnectStart:v,onConnect:w,onConnectEnd:b,isValidConnection:_=F9,onReconnectEnd:S,updateConnection:x,getTransform:A,getFromHandle:k,autoPanSpeed:T}){const O=O9(e.target);let $=0,L;const{x:M,y:z}=Ri(e),P=O==null?void 0:O.elementFromPoint(M,z),q=q9(a,P),D=l==null?void 0:l.getBoundingClientRect();if(!D||!q)return;const H=z9(i,q,r,c,t);if(!H)return;let B=Ri(e,D),G=!1,K=null,Q=!1,R=null;function V(){if(!d||!D)return;const[re,le]=k9(B,D,T);m({x:re,y:le}),$=requestAnimationFrame(V)}const X={...H,nodeId:i,type:q,position:H.position},j=c.get(i),U={inProgress:!0,isValid:null,from:hc(j,X,Pe.Left,!0),fromHandle:X,fromPosition:X.position,fromNode:j,to:B,toHandle:null,toPosition:UO[X.position],toNode:null};x(U);let Y=U;v==null||v(e,{nodeId:i,handleId:r,handleType:q});function ne(re){if(!k()||!X){ae(re);return}const le=A();B=Ri(re,D),L=tte(Rc(B,le,!1,[1,1]),n,c,X),G||(V(),G=!0);const W=B9(re,{handle:L,connectionMode:t,fromNodeId:i,fromHandleId:r,fromType:o?"target":"source",isValidConnection:_,doc:O,lib:f,flowId:h,nodeLookup:c});R=W.handleDomNode,K=W.connection,Q=nte(!!L,W.isValid);const J={...Y,isValid:Q,to:W.toHandle&&Q?np({x:W.toHandle.x,y:W.toHandle.y},le):B,toHandle:W.toHandle,toPosition:Q&&W.toHandle?W.toHandle.position:UO[X.position],toNode:W.toHandle?c.get(W.toHandle.nodeId):null};Q&&L&&Y.toHandle&&J.toHandle&&Y.toHandle.type===J.toHandle.type&&Y.toHandle.nodeId===J.toHandle.nodeId&&Y.toHandle.id===J.toHandle.id&&Y.to.x===J.to.x&&Y.to.y===J.to.y||(x(J),Y=J)}function ae(re){(L||R)&&K&&Q&&(w==null||w(K));const{inProgress:le,...W}=Y,J={...W,toPosition:Y.toHandle?Y.toPosition:null};b==null||b(re,J),a&&(S==null||S(re,J)),g(),cancelAnimationFrame($),G=!1,Q=!1,K=null,R=null,O.removeEventListener("mousemove",ne),O.removeEventListener("mouseup",ae),O.removeEventListener("touchmove",ne),O.removeEventListener("touchend",ae)}O.addEventListener("mousemove",ne),O.addEventListener("mouseup",ae),O.addEventListener("touchmove",ne),O.addEventListener("touchend",ae)}function B9(e,{handle:t,connectionMode:n,fromNodeId:r,fromHandleId:i,fromType:a,doc:o,lib:l,flowId:c,isValidConnection:f=F9,nodeLookup:d}){const h=a==="target",m=t?o.querySelector(`.${l}-flow__handle[data-id="${c}-${t==null?void 0:t.nodeId}-${t==null?void 0:t.id}-${t==null?void 0:t.type}"]`):null,{x:g,y:v}=Ri(e),w=o.elementFromPoint(g,v),b=w!=null&&w.classList.contains(`${l}-flow__handle`)?w:m,_={handleDomNode:b,isValid:!1,connection:null,toHandle:null};if(b){const S=q9(void 0,b),x=b.getAttribute("data-nodeid"),A=b.getAttribute("data-handleid"),k=b.classList.contains("connectable"),T=b.classList.contains("connectableend");if(!x||!S)return _;const O={source:h?x:r,sourceHandle:h?A:i,target:h?r:x,targetHandle:h?i:A};_.connection=O;const L=k&&T&&(n===Zo.Strict?h&&S==="source"||!h&&S==="target":x!==r||A!==i);_.isValid=L&&f(O),_.toHandle=z9(x,S,A,d,n,!0)}return _}const Pw={onPointerDown:rte,isValid:B9};function ite({domNode:e,panZoom:t,getTransform:n,getViewScale:r}){const i=er(e);function a({translateExtent:l,width:c,height:f,zoomStep:d=10,pannable:h=!0,zoomable:m=!0,inversePan:g=!1}){const v=x=>{const A=n();if(x.sourceEvent.type!=="wheel"||!t)return;const k=-x.sourceEvent.deltaY*(x.sourceEvent.deltaMode===1?.05:x.sourceEvent.deltaMode?1:.002)*d,T=A[2]*Math.pow(2,k);t.scaleTo(T)};let w=[0,0];const b=x=>{(x.sourceEvent.type==="mousedown"||x.sourceEvent.type==="touchstart")&&(w=[x.sourceEvent.clientX??x.sourceEvent.touches[0].clientX,x.sourceEvent.clientY??x.sourceEvent.touches[0].clientY])},_=x=>{const A=n();if(x.sourceEvent.type!=="mousemove"&&x.sourceEvent.type!=="touchmove"||!t)return;const k=[x.sourceEvent.clientX??x.sourceEvent.touches[0].clientX,x.sourceEvent.clientY??x.sourceEvent.touches[0].clientY],T=[k[0]-w[0],k[1]-w[1]];w=k;const O=r()*Math.max(A[2],Math.log(A[2]))*(g?-1:1),$={x:A[0]-T[0]*O,y:A[1]-T[1]*O},L=[[0,0],[c,f]];t.setViewportConstrained({x:$.x,y:$.y,zoom:A[2]},L,l)},S=y9().on("start",b).on("zoom",h?_:null).on("zoom.wheel",m?v:null);i.call(S,{})}function o(){i.on("zoom",null)}return{update:a,destroy:o,pointer:Nr}}const ate=(e,t)=>e.x!==t.x||e.y!==t.y||e.zoom!==t.k,$p=e=>({x:e.x,y:e.y,zoom:e.k}),S0=({x:e,y:t,zoom:n})=>Np.translate(e,t).scale(n),$o=(e,t)=>e.target.closest(`.${t}`),U9=(e,t)=>t===2&&Array.isArray(e)&&e.includes(2),E0=(e,t=0,n=()=>{})=>{const r=typeof t=="number"&&t>0;return r||n(),r?e.transition().duration(t).on("end",n):e},V9=e=>{const t=e.ctrlKey&&rp()?10:1;return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*t};function ste({zoomPanValues:e,noWheelClassName:t,d3Selection:n,d3Zoom:r,panOnScrollMode:i,panOnScrollSpeed:a,zoomOnPinch:o,onPanZoomStart:l,onPanZoom:c,onPanZoomEnd:f}){return d=>{if($o(d,t))return!1;d.preventDefault(),d.stopImmediatePropagation();const h=n.property("__zoom").k||1;if(d.ctrlKey&&o){const b=Nr(d),_=V9(d),S=h*Math.pow(2,_);r.scaleTo(n,S,b,d);return}const m=d.deltaMode===1?20:1;let g=i===bs.Vertical?0:d.deltaX*m,v=i===bs.Horizontal?0:d.deltaY*m;!rp()&&d.shiftKey&&i!==bs.Vertical&&(g=d.deltaY*m,v=0),r.translateBy(n,-(g/h)*a,-(v/h)*a,{internal:!0});const w=$p(n.property("__zoom"));clearTimeout(e.panScrollTimeout),e.isPanScrolling||(e.isPanScrolling=!0,l==null||l(d,w)),e.isPanScrolling&&(c==null||c(d,w),e.panScrollTimeout=setTimeout(()=>{f==null||f(d,w),e.isPanScrolling=!1},150))}}function ote({noWheelClassName:e,preventScrolling:t,d3ZoomHandler:n}){return function(r,i){const a=r.type==="wheel",o=!t&&a&&!r.ctrlKey,l=$o(r,e);if(r.ctrlKey&&a&&l&&r.preventDefault(),o||l)return null;r.preventDefault(),n.call(this,r,i)}}function lte({zoomPanValues:e,onDraggingChange:t,onPanZoomStart:n}){return r=>{var a,o,l;if((a=r.sourceEvent)!=null&&a.internal)return;const i=$p(r.transform);e.mouseButton=((o=r.sourceEvent)==null?void 0:o.button)||0,e.isZoomingOrPanning=!0,e.prevViewport=i,((l=r.sourceEvent)==null?void 0:l.type)==="mousedown"&&t(!0),n&&(n==null||n(r.sourceEvent,i))}}function ute({zoomPanValues:e,panOnDrag:t,onPaneContextMenu:n,onTransformChange:r,onPanZoom:i}){return a=>{var o,l;e.usedRightMouseButton=!!(n&&U9(t,e.mouseButton??0)),(o=a.sourceEvent)!=null&&o.sync||r([a.transform.x,a.transform.y,a.transform.k]),i&&!((l=a.sourceEvent)!=null&&l.internal)&&(i==null||i(a.sourceEvent,$p(a.transform)))}}function cte({zoomPanValues:e,panOnDrag:t,panOnScroll:n,onDraggingChange:r,onPanZoomEnd:i,onPaneContextMenu:a}){return o=>{var l;if(!((l=o.sourceEvent)!=null&&l.internal)&&(e.isZoomingOrPanning=!1,a&&U9(t,e.mouseButton??0)&&!e.usedRightMouseButton&&o.sourceEvent&&a(o.sourceEvent),e.usedRightMouseButton=!1,r(!1),i&&ate(e.prevViewport,o.transform))){const c=$p(o.transform);e.prevViewport=c,clearTimeout(e.timerId),e.timerId=setTimeout(()=>{i==null||i(o.sourceEvent,c)},n?150:0)}}}function fte({zoomActivationKeyPressed:e,zoomOnScroll:t,zoomOnPinch:n,panOnDrag:r,panOnScroll:i,zoomOnDoubleClick:a,userSelectionActive:o,noWheelClassName:l,noPanClassName:c,lib:f}){return d=>{var v;const h=e||t,m=n&&d.ctrlKey;if(d.button===1&&d.type==="mousedown"&&($o(d,`${f}-flow__node`)||$o(d,`${f}-flow__edge`)))return!0;if(!r&&!h&&!i&&!a&&!n||o||$o(d,l)&&d.type==="wheel"||$o(d,c)&&(d.type!=="wheel"||i&&d.type==="wheel"&&!e)||!n&&d.ctrlKey&&d.type==="wheel")return!1;if(!n&&d.type==="touchstart"&&((v=d.touches)==null?void 0:v.length)>1)return d.preventDefault(),!1;if(!h&&!i&&!m&&d.type==="wheel"||!r&&(d.type==="mousedown"||d.type==="touchstart")||Array.isArray(r)&&!r.includes(d.button)&&d.type==="mousedown")return!1;const g=Array.isArray(r)&&r.includes(d.button)||!d.button||d.button<=1;return(!d.ctrlKey||d.type==="wheel")&&g}}function dte({domNode:e,minZoom:t,maxZoom:n,paneClickDistance:r,translateExtent:i,viewport:a,onPanZoom:o,onPanZoomStart:l,onPanZoomEnd:c,onDraggingChange:f}){const d={isZoomingOrPanning:!1,usedRightMouseButton:!1,prevViewport:{x:0,y:0,zoom:0},mouseButton:0,timerId:void 0,panScrollTimeout:void 0,isPanScrolling:!1},h=e.getBoundingClientRect(),m=y9().clickDistance(!jr(r)||r<0?0:r).scaleExtent([t,n]).translateExtent(i),g=er(e).call(m);x({x:a.x,y:a.y,zoom:Ko(a.zoom,t,n)},[[0,0],[h.width,h.height]],i);const v=g.on("wheel.zoom"),w=g.on("dblclick.zoom");m.wheelDelta(V9);function b(P,q){return g?new Promise(D=>{m==null||m.transform(E0(g,q==null?void 0:q.duration,()=>D(!0)),P)}):Promise.resolve(!1)}function _({noWheelClassName:P,noPanClassName:q,onPaneContextMenu:D,userSelectionActive:H,panOnScroll:B,panOnDrag:G,panOnScrollMode:K,panOnScrollSpeed:Q,preventScrolling:R,zoomOnPinch:V,zoomOnScroll:X,zoomOnDoubleClick:j,zoomActivationKeyPressed:I,lib:U,onTransformChange:Y}){H&&!d.isZoomingOrPanning&&S();const ae=B&&!I&&!H?ste({zoomPanValues:d,noWheelClassName:P,d3Selection:g,d3Zoom:m,panOnScrollMode:K,panOnScrollSpeed:Q,zoomOnPinch:V,onPanZoomStart:l,onPanZoom:o,onPanZoomEnd:c}):ote({noWheelClassName:P,preventScrolling:R,d3ZoomHandler:v});if(g.on("wheel.zoom",ae,{passive:!1}),!H){const le=lte({zoomPanValues:d,onDraggingChange:f,onPanZoomStart:l});m.on("start",le);const W=ute({zoomPanValues:d,panOnDrag:G,onPaneContextMenu:!!D,onPanZoom:o,onTransformChange:Y});m.on("zoom",W);const J=cte({zoomPanValues:d,panOnDrag:G,panOnScroll:B,onPaneContextMenu:D,onPanZoomEnd:c,onDraggingChange:f});m.on("end",J)}const re=fte({zoomActivationKeyPressed:I,panOnDrag:G,zoomOnScroll:X,panOnScroll:B,zoomOnDoubleClick:j,zoomOnPinch:V,userSelectionActive:H,noPanClassName:q,noWheelClassName:P,lib:U});m.filter(re),j?g.on("dblclick.zoom",w):g.on("dblclick.zoom",null)}function S(){m.on("zoom",null)}async function x(P,q,D){const H=S0(P),B=m==null?void 0:m.constrain()(H,q,D);return B&&await b(B),new Promise(G=>G(B))}async function A(P,q){const D=S0(P);return await b(D,q),new Promise(H=>H(D))}function k(P){if(g){const q=S0(P),D=g.property("__zoom");(D.k!==P.zoom||D.x!==P.x||D.y!==P.y)&&(m==null||m.transform(g,q,null,{sync:!0}))}}function T(){const P=g?g9(g.node()):{x:0,y:0,k:1};return{x:P.x,y:P.y,zoom:P.k}}function O(P,q){return g?new Promise(D=>{m==null||m.scaleTo(E0(g,q==null?void 0:q.duration,()=>D(!0)),P)}):Promise.resolve(!1)}function $(P,q){return g?new Promise(D=>{m==null||m.scaleBy(E0(g,q==null?void 0:q.duration,()=>D(!0)),P)}):Promise.resolve(!1)}function L(P){m==null||m.scaleExtent(P)}function M(P){m==null||m.translateExtent(P)}function z(P){const q=!jr(P)||P<0?0:P;m==null||m.clickDistance(q)}return{update:_,destroy:S,setViewport:A,setViewportConstrained:x,getViewport:T,scaleTo:O,scaleBy:$,setScaleExtent:L,setTranslateExtent:M,syncViewport:k,setClickDistance:z}}var Yu;(function(e){e.Line="line",e.Handle="handle"})(Yu||(Yu={}));function hte({width:e,prevWidth:t,height:n,prevHeight:r,affectsX:i,affectsY:a}){const o=e-t,l=n-r,c=[o>0?1:o<0?-1:0,l>0?1:l<0?-1:0];return o&&i&&(c[0]=c[0]*-1),l&&a&&(c[1]=c[1]*-1),c}function pte(e){const t=e.includes("right")||e.includes("left"),n=e.includes("bottom")||e.includes("top"),r=e.includes("left"),i=e.includes("top");return{isHorizontal:t,isVertical:n,affectsX:r,affectsY:i}}function _a(e,t){return Math.max(0,t-e)}function xa(e,t){return Math.max(0,e-t)}function Od(e,t,n){return Math.max(0,t-e,e-n)}function nN(e,t){return e?!t:t}function mte(e,t,n,r,i,a,o,l){let{affectsX:c,affectsY:f}=t;const{isHorizontal:d,isVertical:h}=t,m=d&&h,{xSnapped:g,ySnapped:v}=n,{minWidth:w,maxWidth:b,minHeight:_,maxHeight:S}=r,{x,y:A,width:k,height:T,aspectRatio:O}=e;let $=Math.floor(d?g-e.pointerX:0),L=Math.floor(h?v-e.pointerY:0);const M=k+(c?-$:$),z=T+(f?-L:L),P=-a[0]*k,q=-a[1]*T;let D=Od(M,w,b),H=Od(z,_,S);if(o){let K=0,Q=0;c&&$<0?K=_a(x+$+P,o[0][0]):!c&&$>0&&(K=xa(x+M+P,o[1][0])),f&&L<0?Q=_a(A+L+q,o[0][1]):!f&&L>0&&(Q=xa(A+z+q,o[1][1])),D=Math.max(D,K),H=Math.max(H,Q)}if(l){let K=0,Q=0;c&&$>0?K=xa(x+$,l[0][0]):!c&&$<0&&(K=_a(x+M,l[1][0])),f&&L>0?Q=xa(A+L,l[0][1]):!f&&L<0&&(Q=_a(A+z,l[1][1])),D=Math.max(D,K),H=Math.max(H,Q)}if(i){if(d){const K=Od(M/O,_,S)*O;if(D=Math.max(D,K),o){let Q=0;!c&&!f||c&&!f&&m?Q=xa(A+q+M/O,o[1][1])*O:Q=_a(A+q+(c?$:-$)/O,o[0][1])*O,D=Math.max(D,Q)}if(l){let Q=0;!c&&!f||c&&!f&&m?Q=_a(A+M/O,l[1][1])*O:Q=xa(A+(c?$:-$)/O,l[0][1])*O,D=Math.max(D,Q)}}if(h){const K=Od(z*O,w,b)/O;if(H=Math.max(H,K),o){let Q=0;!c&&!f||f&&!c&&m?Q=xa(x+z*O+P,o[1][0])/O:Q=_a(x+(f?L:-L)*O+P,o[0][0])/O,H=Math.max(H,Q)}if(l){let Q=0;!c&&!f||f&&!c&&m?Q=_a(x+z*O,l[1][0])/O:Q=xa(x+(f?L:-L)*O,l[0][0])/O,H=Math.max(H,Q)}}}L=L+(L<0?H:-H),$=$+($<0?D:-D),i&&(m?M>z*O?L=(nN(c,f)?-$:$)/O:$=(nN(c,f)?-L:L)*O:d?(L=$/O,f=c):($=L*O,c=f));const B=c?x+$:x,G=f?A+L:A;return{width:k+(c?-$:$),height:T+(f?-L:L),x:a[0]*$*(c?-1:1)+B,y:a[1]*L*(f?-1:1)+G}}const H9={width:0,height:0,x:0,y:0},gte={...H9,pointerX:0,pointerY:0,aspectRatio:1};function yte(e){return[[0,0],[e.measured.width,e.measured.height]]}function bte(e,t,n){const r=t.position.x+e.position.x,i=t.position.y+e.position.y,a=e.measured.width??0,o=e.measured.height??0,l=n[0]*a,c=n[1]*o;return[[r-l,i-c],[r+a-l,i+o-c]]}function vte({domNode:e,nodeId:t,getStoreItems:n,onChange:r,onEnd:i}){const a=er(e);function o({controlPosition:c,boundaries:f,keepAspectRatio:d,resizeDirection:h,onResizeStart:m,onResize:g,onResizeEnd:v,shouldResize:w}){let b={...H9},_={...gte};const S=pte(c);let x,A=null,k=[],T,O,$;const L=n9().on("start",M=>{const{nodeLookup:z,transform:P,snapGrid:q,snapToGrid:D,nodeOrigin:H,paneDomNode:B}=n();if(x=z.get(t),!x)return;A=(B==null?void 0:B.getBoundingClientRect())??null;const{xSnapped:G,ySnapped:K}=Gu(M.sourceEvent,{transform:P,snapGrid:q,snapToGrid:D,containerBounds:A});b={width:x.measured.width??0,height:x.measured.height??0,x:x.position.x??0,y:x.position.y??0},_={...b,pointerX:G,pointerY:K,aspectRatio:b.width/b.height},T=void 0,x.parentId&&(x.extent==="parent"||x.expandParent)&&(T=z.get(x.parentId),O=T&&x.extent==="parent"?yte(T):void 0),k=[],$=void 0;for(const[Q,R]of z)if(R.parentId===t&&(k.push({id:Q,position:{...R.position},extent:R.extent}),R.extent==="parent"||R.expandParent)){const V=bte(R,x,R.origin??H);$?$=[[Math.min(V[0][0],$[0][0]),Math.min(V[0][1],$[0][1])],[Math.max(V[1][0],$[1][0]),Math.max(V[1][1],$[1][1])]]:$=V}m==null||m(M,{...b})}).on("drag",M=>{const{transform:z,snapGrid:P,snapToGrid:q,nodeOrigin:D}=n(),H=Gu(M.sourceEvent,{transform:z,snapGrid:P,snapToGrid:q,containerBounds:A}),B=[];if(!x)return;const{x:G,y:K,width:Q,height:R}=b,V={},X=x.origin??D,{width:j,height:I,x:U,y:Y}=mte(_,S,H,f,d,X,O,$),ne=j!==Q,ae=I!==R,re=U!==G&&ne,le=Y!==K&&ae;if(!re&&!le&&!ne&&!ae)return;if((re||le||X[0]===1||X[1]===1)&&(V.x=re?U:b.x,V.y=le?Y:b.y,b.x=V.x,b.y=V.y,k.length>0)){const fe=U-G,me=Y-K;for(const xe of k)xe.position={x:xe.position.x-fe+X[0]*(j-Q),y:xe.position.y-me+X[1]*(I-R)},B.push(xe)}if((ne||ae)&&(V.width=ne&&(!h||h==="horizontal")?j:b.width,V.height=ae&&(!h||h==="vertical")?I:b.height,b.width=V.width,b.height=V.height),T&&x.expandParent){const fe=X[0]*(V.width??0);V.x&&V.x<fe&&(b.x=fe,_.x=_.x-(V.x-fe));const me=X[1]*(V.height??0);V.y&&V.y<me&&(b.y=me,_.y=_.y-(V.y-me))}const W=hte({width:b.width,prevWidth:Q,height:b.height,prevHeight:R,affectsX:S.affectsX,affectsY:S.affectsY}),J={...b,direction:W};(w==null?void 0:w(M,J))!==!1&&(g==null||g(M,J),r(V,B))}).on("end",M=>{v==null||v(M,{...b}),i==null||i({...b})});a.call(L)}function l(){a.on(".drag",null)}return{update:o,destroy:l}}var k0={exports:{}},A0={},T0={exports:{}},C0={};/**
|
|
209
|
+
* @license React
|
|
210
|
+
* use-sync-external-store-shim.production.js
|
|
211
|
+
*
|
|
212
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
213
|
+
*
|
|
214
|
+
* This source code is licensed under the MIT license found in the
|
|
215
|
+
* LICENSE file in the root directory of this source tree.
|
|
216
|
+
*/var rN;function _te(){if(rN)return C0;rN=1;var e=Sc();function t(h,m){return h===m&&(h!==0||1/h===1/m)||h!==h&&m!==m}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,i=e.useEffect,a=e.useLayoutEffect,o=e.useDebugValue;function l(h,m){var g=m(),v=r({inst:{value:g,getSnapshot:m}}),w=v[0].inst,b=v[1];return a(function(){w.value=g,w.getSnapshot=m,c(w)&&b({inst:w})},[h,g,m]),i(function(){return c(w)&&b({inst:w}),h(function(){c(w)&&b({inst:w})})},[h]),o(g),g}function c(h){var m=h.getSnapshot;h=h.value;try{var g=m();return!n(h,g)}catch{return!0}}function f(h,m){return m()}var d=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?f:l;return C0.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:d,C0}var iN;function xte(){return iN||(iN=1,T0.exports=_te()),T0.exports}/**
|
|
217
|
+
* @license React
|
|
218
|
+
* use-sync-external-store-shim/with-selector.production.js
|
|
219
|
+
*
|
|
220
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
221
|
+
*
|
|
222
|
+
* This source code is licensed under the MIT license found in the
|
|
223
|
+
* LICENSE file in the root directory of this source tree.
|
|
224
|
+
*/var aN;function wte(){if(aN)return A0;aN=1;var e=Sc(),t=xte();function n(f,d){return f===d&&(f!==0||1/f===1/d)||f!==f&&d!==d}var r=typeof Object.is=="function"?Object.is:n,i=t.useSyncExternalStore,a=e.useRef,o=e.useEffect,l=e.useMemo,c=e.useDebugValue;return A0.useSyncExternalStoreWithSelector=function(f,d,h,m,g){var v=a(null);if(v.current===null){var w={hasValue:!1,value:null};v.current=w}else w=v.current;v=l(function(){function _(T){if(!S){if(S=!0,x=T,T=m(T),g!==void 0&&w.hasValue){var O=w.value;if(g(O,T))return A=O}return A=T}if(O=A,r(x,T))return O;var $=m(T);return g!==void 0&&g(O,$)?(x=T,O):(x=T,A=$)}var S=!1,x,A,k=h===void 0?null:h;return[function(){return _(d())},k===null?void 0:function(){return _(k())}]},[d,h,m,g]);var b=i(f,v[0],v[1]);return o(function(){w.hasValue=!0,w.value=b},[b]),c(b),b},A0}var sN;function Ste(){return sN||(sN=1,k0.exports=wte()),k0.exports}var Ete=Ste();const kte=zn(Ete),Ate={},oN=e=>{let t;const n=new Set,r=(d,h)=>{const m=typeof d=="function"?d(t):d;if(!Object.is(m,t)){const g=t;t=h??(typeof m!="object"||m===null)?m:Object.assign({},t,m),n.forEach(v=>v(t,g))}},i=()=>t,c={setState:r,getState:i,getInitialState:()=>f,subscribe:d=>(n.add(d),()=>n.delete(d)),destroy:()=>{(Ate?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},f=t=e(r,i,c);return c},Tte=e=>e?oN(e):oN,{useDebugValue:Cte}=KI,{useSyncExternalStoreWithSelector:Ote}=kte,Nte=e=>e;function G9(e,t=Nte,n){const r=Ote(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return Cte(r),r}const lN=(e,t)=>{const n=Tte(e),r=(i,a=t)=>G9(n,i,a);return Object.assign(r,n),r},Rte=(e,t)=>e?lN(e,t):lN;function Ut(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const[r,i]of e)if(!Object.is(i,t.get(r)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const r of e)if(!t.has(r))return!1;return!0}const n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(const r of n)if(!Object.prototype.hasOwnProperty.call(t,r)||!Object.is(e[r],t[r]))return!1;return!0}ZI();const Dp=te.createContext(null),jte=Dp.Provider,Y9=Jr.error001();function ut(e,t){const n=te.useContext(Dp);if(n===null)throw new Error(Y9);return G9(n,e,t)}function Lt(){const e=te.useContext(Dp);if(e===null)throw new Error(Y9);return te.useMemo(()=>({getState:e.getState,setState:e.setState,subscribe:e.subscribe}),[e])}const uN={display:"none"},Mte={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},Z9="react-flow__node-desc",K9="react-flow__edge-desc",$te="react-flow__aria-live",Dte=e=>e.ariaLiveMessage;function Ite({rfId:e}){const t=ut(Dte);return N.jsx("div",{id:`${$te}-${e}`,"aria-live":"assertive","aria-atomic":"true",style:Mte,children:t})}function Pte({rfId:e,disableKeyboardA11y:t}){return N.jsxs(N.Fragment,{children:[N.jsxs("div",{id:`${Z9}-${e}`,style:uN,children:["Press enter or space to select a node.",!t&&"You can then use the arrow keys to move the node around."," Press delete to remove it and escape to cancel."," "]}),N.jsx("div",{id:`${K9}-${e}`,style:uN,children:"Press enter or space to select an edge. You can then press delete to remove it or escape to cancel."}),!t&&N.jsx(Ite,{rfId:e})]})}const Lte=e=>e.userSelectionActive?"none":"all",jc=te.forwardRef(({position:e="top-left",children:t,className:n,style:r,...i},a)=>{const o=ut(Lte),l=`${e}`.split("-");return N.jsx("div",{className:en(["react-flow__panel",n,...l]),style:{...r,pointerEvents:o},ref:a,...i,children:t})});jc.displayName="Panel";function zte({proOptions:e,position:t="bottom-right"}){return e!=null&&e.hideAttribution?null:N.jsx(jc,{position:t,className:"react-flow__attribution","data-message":"Please only hide this attribution when you are subscribed to React Flow Pro: https://pro.reactflow.dev",children:N.jsx("a",{href:"https://reactflow.dev",target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution",children:"React Flow"})})}const qte=e=>{const t=[],n=[];for(const[,r]of e.nodeLookup)r.selected&&t.push(r.internals.userNode);for(const[,r]of e.edgeLookup)r.selected&&n.push(r);return{selectedNodes:t,selectedEdges:n}},Nd=e=>e.id;function Fte(e,t){return Ut(e.selectedNodes.map(Nd),t.selectedNodes.map(Nd))&&Ut(e.selectedEdges.map(Nd),t.selectedEdges.map(Nd))}function Bte({onSelectionChange:e}){const t=Lt(),{selectedNodes:n,selectedEdges:r}=ut(qte,Fte);return te.useEffect(()=>{const i={nodes:n,edges:r};e==null||e(i),t.getState().onSelectionChangeHandlers.forEach(a=>a(i))},[n,r,e]),null}const Ute=e=>!!e.onSelectionChangeHandlers;function Vte({onSelectionChange:e}){const t=ut(Ute);return e||t?N.jsx(Bte,{onSelectionChange:e}):null}const X9=[0,0],Hte={x:0,y:0,zoom:1},Gte=["nodes","edges","defaultNodes","defaultEdges","onConnect","onConnectStart","onConnectEnd","onClickConnectStart","onClickConnectEnd","nodesDraggable","nodesConnectable","nodesFocusable","edgesFocusable","edgesReconnectable","elevateNodesOnSelect","elevateEdgesOnSelect","minZoom","maxZoom","nodeExtent","onNodesChange","onEdgesChange","elementsSelectable","connectionMode","snapGrid","snapToGrid","translateExtent","connectOnClick","defaultEdgeOptions","fitView","fitViewOptions","onNodesDelete","onEdgesDelete","onDelete","onNodeDrag","onNodeDragStart","onNodeDragStop","onSelectionDrag","onSelectionDragStart","onSelectionDragStop","onMoveStart","onMove","onMoveEnd","noPanClassName","nodeOrigin","autoPanOnConnect","autoPanOnNodeDrag","onError","connectionRadius","isValidConnection","selectNodesOnDrag","nodeDragThreshold","onBeforeDelete","debug","autoPanSpeed","paneClickDistance"],cN=[...Gte,"rfId"],Yte=e=>({setNodes:e.setNodes,setEdges:e.setEdges,setMinZoom:e.setMinZoom,setMaxZoom:e.setMaxZoom,setTranslateExtent:e.setTranslateExtent,setNodeExtent:e.setNodeExtent,reset:e.reset,setDefaultNodesAndEdges:e.setDefaultNodesAndEdges,setPaneClickDistance:e.setPaneClickDistance}),fN={translateExtent:cc,nodeOrigin:X9,minZoom:.5,maxZoom:2,elementsSelectable:!0,noPanClassName:"nopan",rfId:"1",paneClickDistance:0};function Zte(e){const{setNodes:t,setEdges:n,setMinZoom:r,setMaxZoom:i,setTranslateExtent:a,setNodeExtent:o,reset:l,setDefaultNodesAndEdges:c,setPaneClickDistance:f}=ut(Yte,Ut),d=Lt();te.useEffect(()=>(c(e.defaultNodes,e.defaultEdges),()=>{h.current=fN,l()}),[]);const h=te.useRef(fN);return te.useEffect(()=>{for(const m of cN){const g=e[m],v=h.current[m];g!==v&&(typeof e[m]>"u"||(m==="nodes"?t(g):m==="edges"?n(g):m==="minZoom"?r(g):m==="maxZoom"?i(g):m==="translateExtent"?a(g):m==="nodeExtent"?o(g):m==="paneClickDistance"?f(g):m==="fitView"?d.setState({fitViewQueued:g}):m==="fitViewOptions"?d.setState({fitViewOptions:g}):d.setState({[m]:g})))}h.current=e},cN.map(m=>e[m])),null}function dN(){return typeof window>"u"||!window.matchMedia?null:window.matchMedia("(prefers-color-scheme: dark)")}function Kte(e){var r;const[t,n]=te.useState(e==="system"?null:e);return te.useEffect(()=>{if(e!=="system"){n(e);return}const i=dN(),a=()=>n(i!=null&&i.matches?"dark":"light");return a(),i==null||i.addEventListener("change",a),()=>{i==null||i.removeEventListener("change",a)}},[e]),t!==null?t:(r=dN())!=null&&r.matches?"dark":"light"}const hN=typeof document<"u"?document:null;function pc(e=null,t={target:hN,actInsideInputWithModifier:!0}){const[n,r]=te.useState(!1),i=te.useRef(!1),a=te.useRef(new Set([])),[o,l]=te.useMemo(()=>{if(e!==null){const f=(Array.isArray(e)?e:[e]).filter(h=>typeof h=="string").map(h=>h.replace("+",`
|
|
225
|
+
`).replace(`
|
|
226
|
+
|
|
227
|
+
`,`
|
|
228
|
+
+`).split(`
|
|
229
|
+
`)),d=f.reduce((h,m)=>h.concat(...m),[]);return[f,d]}return[[],[]]},[e]);return te.useEffect(()=>{const c=(t==null?void 0:t.target)??hN,f=(t==null?void 0:t.actInsideInputWithModifier)??!0;if(e!==null){const d=g=>{var b,_;if(i.current=g.ctrlKey||g.metaKey||g.shiftKey||g.altKey,(!i.current||i.current&&!f)&&N9(g))return!1;const w=mN(g.code,l);if(a.current.add(g[w]),pN(o,a.current,!1)){const S=((_=(b=g.composedPath)==null?void 0:b.call(g))==null?void 0:_[0])||g.target,x=(S==null?void 0:S.nodeName)==="BUTTON"||(S==null?void 0:S.nodeName)==="A";t.preventDefault!==!1&&(i.current||!x)&&g.preventDefault(),r(!0)}},h=g=>{const v=mN(g.code,l);pN(o,a.current,!0)?(r(!1),a.current.clear()):a.current.delete(g[v]),g.key==="Meta"&&a.current.clear(),i.current=!1},m=()=>{a.current.clear(),r(!1)};return c==null||c.addEventListener("keydown",d),c==null||c.addEventListener("keyup",h),window.addEventListener("blur",m),window.addEventListener("contextmenu",m),()=>{c==null||c.removeEventListener("keydown",d),c==null||c.removeEventListener("keyup",h),window.removeEventListener("blur",m),window.removeEventListener("contextmenu",m)}}},[e,r]),n}function pN(e,t,n){return e.filter(r=>n||r.length===t.size).some(r=>r.every(i=>t.has(i)))}function mN(e,t){return t.includes(e)?"code":"key"}const Xte=()=>{const e=Lt();return te.useMemo(()=>({zoomIn:t=>{const{panZoom:n}=e.getState();return n?n.scaleBy(1.2,{duration:t==null?void 0:t.duration}):Promise.resolve(!1)},zoomOut:t=>{const{panZoom:n}=e.getState();return n?n.scaleBy(1/1.2,{duration:t==null?void 0:t.duration}):Promise.resolve(!1)},zoomTo:(t,n)=>{const{panZoom:r}=e.getState();return r?r.scaleTo(t,{duration:n==null?void 0:n.duration}):Promise.resolve(!1)},getZoom:()=>e.getState().transform[2],setViewport:async(t,n)=>{const{transform:[r,i,a],panZoom:o}=e.getState();return o?(await o.setViewport({x:t.x??r,y:t.y??i,zoom:t.zoom??a},{duration:n==null?void 0:n.duration}),Promise.resolve(!0)):Promise.resolve(!1)},getViewport:()=>{const[t,n,r]=e.getState().transform;return{x:t,y:n,zoom:r}},setCenter:async(t,n,r)=>{const{width:i,height:a,maxZoom:o,panZoom:l}=e.getState(),c=typeof(r==null?void 0:r.zoom)<"u"?r.zoom:o,f=i/2-t*c,d=a/2-n*c;return l?(await l.setViewport({x:f,y:d,zoom:c},{duration:r==null?void 0:r.duration}),Promise.resolve(!0)):Promise.resolve(!1)},fitBounds:async(t,n)=>{const{width:r,height:i,minZoom:a,maxZoom:o,panZoom:l}=e.getState(),c=OS(t,r,i,a,o,(n==null?void 0:n.padding)??.1);return l?(await l.setViewport(c,{duration:n==null?void 0:n.duration}),Promise.resolve(!0)):Promise.resolve(!1)},screenToFlowPosition:(t,n={})=>{const{transform:r,snapGrid:i,snapToGrid:a,domNode:o}=e.getState();if(!o)return t;const{x:l,y:c}=o.getBoundingClientRect(),f={x:t.x-l,y:t.y-c},d=n.snapGrid??i,h=n.snapToGrid??a;return Rc(f,r,h,d)},flowToScreenPosition:t=>{const{transform:n,domNode:r}=e.getState();if(!r)return t;const{x:i,y:a}=r.getBoundingClientRect(),o=np(t,n);return{x:o.x+i,y:o.y+a}}}),[])};function W9(e,t){const n=[],r=new Map,i=[];for(const a of e)if(a.type==="add"){i.push(a);continue}else if(a.type==="remove"||a.type==="replace")r.set(a.id,[a]);else{const o=r.get(a.id);o?o.push(a):r.set(a.id,[a])}for(const a of t){const o=r.get(a.id);if(!o){n.push(a);continue}if(o[0].type==="remove")continue;if(o[0].type==="replace"){n.push({...o[0].item});continue}const l={...a};for(const c of o)Wte(c,l);n.push(l)}return i.length&&i.forEach(a=>{a.index!==void 0?n.splice(a.index,0,{...a.item}):n.push({...a.item})}),n}function Wte(e,t){switch(e.type){case"select":{t.selected=e.selected;break}case"position":{typeof e.position<"u"&&(t.position=e.position),typeof e.dragging<"u"&&(t.dragging=e.dragging);break}case"dimensions":{typeof e.dimensions<"u"&&(t.measured??(t.measured={}),t.measured.width=e.dimensions.width,t.measured.height=e.dimensions.height,e.setAttributes&&((e.setAttributes===!0||e.setAttributes==="width")&&(t.width=e.dimensions.width),(e.setAttributes===!0||e.setAttributes==="height")&&(t.height=e.dimensions.height))),typeof e.resizing=="boolean"&&(t.resizing=e.resizing);break}}}function Q9(e,t){return W9(e,t)}function J9(e,t){return W9(e,t)}function ls(e,t){return{id:e,type:"select",selected:t}}function Do(e,t=new Set,n=!1){const r=[];for(const[i,a]of e){const o=t.has(i);!(a.selected===void 0&&!o)&&a.selected!==o&&(n&&(a.selected=o),r.push(ls(a.id,o)))}return r}function gN({items:e=[],lookup:t}){var i;const n=[],r=new Map(e.map(a=>[a.id,a]));for(const[a,o]of e.entries()){const l=t.get(o.id),c=((i=l==null?void 0:l.internals)==null?void 0:i.userNode)??l;c!==void 0&&c!==o&&n.push({id:o.id,item:o,type:"replace"}),c===void 0&&n.push({item:o,type:"add",index:a})}for(const[a]of t)r.get(a)===void 0&&n.push({id:a,type:"remove"});return n}function yN(e){return{id:e.id,type:"remove"}}const bN=e=>Eee(e),Qte=e=>x9(e);function eP(e){return te.forwardRef(e)}const Jte=typeof window<"u"?te.useLayoutEffect:te.useEffect;function vN(e){const[t,n]=te.useState(BigInt(0)),[r]=te.useState(()=>ene(()=>n(i=>i+BigInt(1))));return Jte(()=>{const i=r.get();i.length&&(e(i),r.reset())},[t]),r}function ene(e){let t=[];return{get:()=>t,reset:()=>{t=[]},push:n=>{t.push(n),e()}}}const tP=te.createContext(null);function tne({children:e}){const t=Lt(),n=te.useCallback(l=>{const{nodes:c=[],setNodes:f,hasDefaultNodes:d,onNodesChange:h,nodeLookup:m,fitViewQueued:g}=t.getState();let v=c;for(const b of l)v=typeof b=="function"?b(v):b;const w=gN({items:v,lookup:m});d&&f(v),w.length>0?h==null||h(w):g&&window.requestAnimationFrame(()=>{const{fitViewQueued:b,nodes:_,setNodes:S}=t.getState();b&&S(_)})},[]),r=vN(n),i=te.useCallback(l=>{const{edges:c=[],setEdges:f,hasDefaultEdges:d,onEdgesChange:h,edgeLookup:m}=t.getState();let g=c;for(const v of l)g=typeof v=="function"?v(g):v;d?f(g):h&&h(gN({items:g,lookup:m}))},[]),a=vN(i),o=te.useMemo(()=>({nodeQueue:r,edgeQueue:a}),[]);return N.jsx(tP.Provider,{value:o,children:e})}function nne(){const e=te.useContext(tP);if(!e)throw new Error("useBatchContext must be used within a BatchProvider");return e}const rne=e=>!!e.panZoom;function Ip(){const e=Xte(),t=Lt(),n=nne(),r=ut(rne),i=te.useMemo(()=>{const a=h=>t.getState().nodeLookup.get(h),o=h=>{n.nodeQueue.push(h)},l=h=>{n.edgeQueue.push(h)},c=h=>{var _,S;const{nodeLookup:m,nodeOrigin:g}=t.getState(),v=bN(h)?h:m.get(h.id),w=v.parentId?C9(v.position,v.measured,v.parentId,m,g):v.position,b={...v,position:w,width:((_=v.measured)==null?void 0:_.width)??v.width,height:((S=v.measured)==null?void 0:S.height)??v.height};return Xo(b)},f=(h,m,g={replace:!1})=>{o(v=>v.map(w=>{if(w.id===h){const b=typeof m=="function"?m(w):m;return g.replace&&bN(b)?b:{...w,...b}}return w}))},d=(h,m,g={replace:!1})=>{l(v=>v.map(w=>{if(w.id===h){const b=typeof m=="function"?m(w):m;return g.replace&&Qte(b)?b:{...w,...b}}return w}))};return{getNodes:()=>t.getState().nodes.map(h=>({...h})),getNode:h=>{var m;return(m=a(h))==null?void 0:m.internals.userNode},getInternalNode:a,getEdges:()=>{const{edges:h=[]}=t.getState();return h.map(m=>({...m}))},getEdge:h=>t.getState().edgeLookup.get(h),setNodes:o,setEdges:l,addNodes:h=>{const m=Array.isArray(h)?h:[h];n.nodeQueue.push(g=>[...g,...m])},addEdges:h=>{const m=Array.isArray(h)?h:[h];n.edgeQueue.push(g=>[...g,...m])},toObject:()=>{const{nodes:h=[],edges:m=[],transform:g}=t.getState(),[v,w,b]=g;return{nodes:h.map(_=>({..._})),edges:m.map(_=>({..._})),viewport:{x:v,y:w,zoom:b}}},deleteElements:async({nodes:h=[],edges:m=[]})=>{const{nodes:g,edges:v,onNodesDelete:w,onEdgesDelete:b,triggerNodeChanges:_,triggerEdgeChanges:S,onDelete:x,onBeforeDelete:A}=t.getState(),{nodes:k,edges:T}=await Oee({nodesToRemove:h,edgesToRemove:m,nodes:g,edges:v,onBeforeDelete:A}),O=T.length>0,$=k.length>0;if(O){const L=T.map(yN);b==null||b(T),S(L)}if($){const L=k.map(yN);w==null||w(k),_(L)}return($||O)&&(x==null||x({nodes:k,edges:T})),{deletedNodes:k,deletedEdges:T}},getIntersectingNodes:(h,m=!0,g)=>{const v=HO(h),w=v?h:c(h),b=g!==void 0;return w?(g||t.getState().nodes).filter(_=>{const S=t.getState().nodeLookup.get(_.id);if(S&&!v&&(_.id===h.id||!S.internals.positionAbsolute))return!1;const x=Xo(b?_:S),A=dc(x,w);return m&&A>0||A>=w.width*w.height}):[]},isNodeIntersecting:(h,m,g=!0)=>{const w=HO(h)?h:c(h);if(!w)return!1;const b=dc(w,m);return g&&b>0||b>=w.width*w.height},updateNode:f,updateNodeData:(h,m,g={replace:!1})=>{f(h,v=>{const w=typeof m=="function"?m(v):m;return g.replace?{...v,data:w}:{...v,data:{...v.data,...w}}},g)},updateEdge:d,updateEdgeData:(h,m,g={replace:!1})=>{d(h,v=>{const w=typeof m=="function"?m(v):m;return g.replace?{...v,data:w}:{...v,data:{...v.data,...w}}},g)},getNodesBounds:h=>{const{nodeLookup:m,nodeOrigin:g}=t.getState();return kee(h,{nodeLookup:m,nodeOrigin:g})},getHandleConnections:({type:h,id:m,nodeId:g})=>{var v;return Array.from(((v=t.getState().connectionLookup.get(`${g}-${h}${m?`-${m}`:""}`))==null?void 0:v.values())??[])},getNodeConnections:({type:h,handleId:m,nodeId:g})=>{var v;return Array.from(((v=t.getState().connectionLookup.get(`${g}${h?m?`-${h}-${m}`:`-${h}`:""}`))==null?void 0:v.values())??[])},fitView:async h=>{const m=t.getState().fitViewResolver??Mee();return t.setState({fitViewQueued:!0,fitViewOptions:h,fitViewResolver:m}),n.nodeQueue.push(g=>[...g]),m.promise}}},[]);return te.useMemo(()=>({...i,...e,viewportInitialized:r}),[r])}const _N=e=>e.selected,ine=typeof window<"u"?window:void 0;function ane({deleteKeyCode:e,multiSelectionKeyCode:t}){const n=Lt(),{deleteElements:r}=Ip(),i=pc(e,{actInsideInputWithModifier:!1}),a=pc(t,{target:ine});te.useEffect(()=>{if(i){const{edges:o,nodes:l}=n.getState();r({nodes:l.filter(_N),edges:o.filter(_N)}),n.setState({nodesSelectionActive:!1})}},[i]),te.useEffect(()=>{n.setState({multiSelectionActive:a})},[a])}function sne(e){const t=Lt();te.useEffect(()=>{const n=()=>{var i,a;if(!e.current)return!1;const r=NS(e.current);(r.height===0||r.width===0)&&((a=(i=t.getState()).onError)==null||a.call(i,"004",Jr.error004())),t.setState({width:r.width||500,height:r.height||500})};if(e.current){n(),window.addEventListener("resize",n);const r=new ResizeObserver(()=>n());return r.observe(e.current),()=>{window.removeEventListener("resize",n),r&&e.current&&r.unobserve(e.current)}}},[])}const Pp={position:"absolute",width:"100%",height:"100%",top:0,left:0},one=e=>({userSelectionActive:e.userSelectionActive,lib:e.lib});function lne({onPaneContextMenu:e,zoomOnScroll:t=!0,zoomOnPinch:n=!0,panOnScroll:r=!1,panOnScrollSpeed:i=.5,panOnScrollMode:a=bs.Free,zoomOnDoubleClick:o=!0,panOnDrag:l=!0,defaultViewport:c,translateExtent:f,minZoom:d,maxZoom:h,zoomActivationKeyCode:m,preventScrolling:g=!0,children:v,noWheelClassName:w,noPanClassName:b,onViewportChange:_,isControlledViewport:S,paneClickDistance:x}){const A=Lt(),k=te.useRef(null),{userSelectionActive:T,lib:O}=ut(one,Ut),$=pc(m),L=te.useRef();sne(k);const M=te.useCallback(z=>{_==null||_({x:z[0],y:z[1],zoom:z[2]}),S||A.setState({transform:z})},[_,S]);return te.useEffect(()=>{if(k.current){L.current=dte({domNode:k.current,minZoom:d,maxZoom:h,translateExtent:f,viewport:c,paneClickDistance:x,onDraggingChange:D=>A.setState({paneDragging:D}),onPanZoomStart:(D,H)=>{const{onViewportChangeStart:B,onMoveStart:G}=A.getState();G==null||G(D,H),B==null||B(H)},onPanZoom:(D,H)=>{const{onViewportChange:B,onMove:G}=A.getState();G==null||G(D,H),B==null||B(H)},onPanZoomEnd:(D,H)=>{const{onViewportChangeEnd:B,onMoveEnd:G}=A.getState();G==null||G(D,H),B==null||B(H)}});const{x:z,y:P,zoom:q}=L.current.getViewport();return A.setState({panZoom:L.current,transform:[z,P,q],domNode:k.current.closest(".react-flow")}),()=>{var D;(D=L.current)==null||D.destroy()}}},[]),te.useEffect(()=>{var z;(z=L.current)==null||z.update({onPaneContextMenu:e,zoomOnScroll:t,zoomOnPinch:n,panOnScroll:r,panOnScrollSpeed:i,panOnScrollMode:a,zoomOnDoubleClick:o,panOnDrag:l,zoomActivationKeyPressed:$,preventScrolling:g,noPanClassName:b,userSelectionActive:T,noWheelClassName:w,lib:O,onTransformChange:M})},[e,t,n,r,i,a,o,l,$,g,b,T,w,O,M]),N.jsx("div",{className:"react-flow__renderer",ref:k,style:Pp,children:v})}const une=e=>({userSelectionActive:e.userSelectionActive,userSelectionRect:e.userSelectionRect});function cne(){const{userSelectionActive:e,userSelectionRect:t}=ut(une,Ut);return e&&t?N.jsx("div",{className:"react-flow__selection react-flow__container",style:{width:t.width,height:t.height,transform:`translate(${t.x}px, ${t.y}px)`}}):null}const O0=(e,t)=>n=>{n.target===t.current&&(e==null||e(n))},fne=e=>({userSelectionActive:e.userSelectionActive,elementsSelectable:e.elementsSelectable,connectionInProgress:e.connection.inProgress,dragging:e.paneDragging});function dne({isSelecting:e,selectionKeyPressed:t,selectionMode:n=fc.Full,panOnDrag:r,selectionOnDrag:i,onSelectionStart:a,onSelectionEnd:o,onPaneClick:l,onPaneContextMenu:c,onPaneScroll:f,onPaneMouseEnter:d,onPaneMouseMove:h,onPaneMouseLeave:m,children:g}){const v=Lt(),{userSelectionActive:w,elementsSelectable:b,dragging:_,connectionInProgress:S}=ut(fne,Ut),x=b&&(e||w),A=te.useRef(null),k=te.useRef(),T=te.useRef(new Set),O=te.useRef(new Set),$=te.useRef(!1),L=te.useRef(!1),M=G=>{if($.current||S){$.current=!1;return}l==null||l(G),v.getState().resetSelectedElements(),v.setState({nodesSelectionActive:!1})},z=G=>{if(Array.isArray(r)&&(r!=null&&r.includes(2))){G.preventDefault();return}c==null||c(G)},P=f?G=>f(G):void 0,q=G=>{var X,j;const{resetSelectedElements:K,domNode:Q}=v.getState();if(k.current=Q==null?void 0:Q.getBoundingClientRect(),!b||!e||G.button!==0||G.target!==A.current||!k.current)return;(j=(X=G.target)==null?void 0:X.setPointerCapture)==null||j.call(X,G.pointerId),L.current=!0,$.current=!1;const{x:R,y:V}=Ri(G.nativeEvent,k.current);K(),v.setState({userSelectionRect:{width:0,height:0,startX:R,startY:V,x:R,y:V}}),a==null||a(G)},D=G=>{const{userSelectionRect:K,transform:Q,nodeLookup:R,edgeLookup:V,connectionLookup:X,triggerNodeChanges:j,triggerEdgeChanges:I,defaultEdgeOptions:U}=v.getState();if(!k.current||!K)return;$.current=!0;const{x:Y,y:ne}=Ri(G.nativeEvent,k.current),{startX:ae,startY:re}=K,le={startX:ae,startY:re,x:Y<ae?Y:ae,y:ne<re?ne:re,width:Math.abs(Y-ae),height:Math.abs(ne-re)},W=T.current,J=O.current;T.current=new Set(w9(R,le,Q,n===fc.Partial,!0).map(fe=>fe.id)),O.current=new Set;const se=(U==null?void 0:U.selectable)??!0;for(const fe of T.current){const me=X.get(fe);if(me)for(const{edgeId:xe}of me.values()){const we=V.get(xe);we&&(we.selectable??se)&&O.current.add(xe)}}if(!GO(W,T.current)){const fe=Do(R,T.current,!0);j(fe)}if(!GO(J,O.current)){const fe=Do(V,O.current);I(fe)}v.setState({userSelectionRect:le,userSelectionActive:!0,nodesSelectionActive:!1})},H=G=>{var Q,R;if(G.button!==0||!L.current)return;(R=(Q=G.target)==null?void 0:Q.releasePointerCapture)==null||R.call(Q,G.pointerId);const{userSelectionRect:K}=v.getState();!w&&K&&G.target===A.current&&(M==null||M(G)),v.setState({userSelectionActive:!1,userSelectionRect:null,nodesSelectionActive:T.current.size>0}),o==null||o(G),(t||i)&&($.current=!1),L.current=!1},B=r===!0||Array.isArray(r)&&r.includes(0);return N.jsxs("div",{className:en(["react-flow__pane",{draggable:B,dragging:_,selection:e}]),onClick:x?void 0:O0(M,A),onContextMenu:O0(z,A),onWheel:O0(P,A),onPointerEnter:x?void 0:d,onPointerDown:x?q:h,onPointerMove:x?D:h,onPointerUp:x?H:void 0,onPointerLeave:m,ref:A,style:Pp,children:[g,N.jsx(cne,{})]})}function Lw({id:e,store:t,unselect:n=!1,nodeRef:r}){const{addSelectedNodes:i,unselectNodesAndEdges:a,multiSelectionActive:o,nodeLookup:l,onError:c}=t.getState(),f=l.get(e);if(!f){c==null||c("012",Jr.error012(e));return}t.setState({nodesSelectionActive:!1}),f.selected?(n||f.selected&&o)&&(a({nodes:[f],edges:[]}),requestAnimationFrame(()=>{var d;return(d=r==null?void 0:r.current)==null?void 0:d.blur()})):i([e])}function nP({nodeRef:e,disabled:t=!1,noDragClassName:n,handleSelector:r,nodeId:i,isSelectable:a,nodeClickDistance:o}){const l=Lt(),[c,f]=te.useState(!1),d=te.useRef();return te.useEffect(()=>{d.current=Qee({getStoreItems:()=>l.getState(),onNodeMouseDown:h=>{Lw({id:h,store:l,nodeRef:e})},onDragStart:()=>{f(!0)},onDragStop:()=>{f(!1)}})},[]),te.useEffect(()=>{var h,m;if(t)(h=d.current)==null||h.destroy();else if(e.current)return(m=d.current)==null||m.update({noDragClassName:n,handleSelector:r,domNode:e.current,isSelectable:a,nodeId:i,nodeClickDistance:o}),()=>{var g;(g=d.current)==null||g.destroy()}},[n,r,t,a,e,i]),c}const hne=e=>t=>t.selected&&(t.draggable||e&&typeof t.draggable>"u");function rP(){const e=Lt();return te.useCallback(n=>{const{nodeExtent:r,snapToGrid:i,snapGrid:a,nodesDraggable:o,onError:l,updateNodePositions:c,nodeLookup:f,nodeOrigin:d}=e.getState(),h=new Map,m=hne(o),g=i?a[0]:5,v=i?a[1]:5,w=n.direction.x*g*n.factor,b=n.direction.y*v*n.factor;for(const[,_]of f){if(!m(_))continue;let S={x:_.internals.positionAbsolute.x+w,y:_.internals.positionAbsolute.y+b};i&&(S=Mp(S,a));const{position:x,positionAbsolute:A}=S9({nodeId:_.id,nextPosition:S,nodeLookup:f,nodeExtent:r,nodeOrigin:d,onError:l});_.position=x,_.internals.positionAbsolute=A,h.set(_.id,_)}c(h)},[])}const DS=te.createContext(null),pne=DS.Provider;DS.Consumer;const iP=()=>te.useContext(DS),mne=e=>({connectOnClick:e.connectOnClick,noPanClassName:e.noPanClassName,rfId:e.rfId}),gne=(e,t,n)=>r=>{const{connectionClickStartHandle:i,connectionMode:a,connection:o}=r,{fromHandle:l,toHandle:c,isValid:f}=o,d=(c==null?void 0:c.nodeId)===e&&(c==null?void 0:c.id)===t&&(c==null?void 0:c.type)===n;return{connectingFrom:(l==null?void 0:l.nodeId)===e&&(l==null?void 0:l.id)===t&&(l==null?void 0:l.type)===n,connectingTo:d,clickConnecting:(i==null?void 0:i.nodeId)===e&&(i==null?void 0:i.id)===t&&(i==null?void 0:i.type)===n,isPossibleEndHandle:a===Zo.Strict?(l==null?void 0:l.type)!==n:e!==(l==null?void 0:l.nodeId)||t!==(l==null?void 0:l.id),connectionInProcess:!!l,clickConnectionInProcess:!!i,valid:d&&f}};function yne({type:e="source",position:t=Pe.Top,isValidConnection:n,isConnectable:r=!0,isConnectableStart:i=!0,isConnectableEnd:a=!0,id:o,onConnect:l,children:c,className:f,onMouseDown:d,onTouchStart:h,...m},g){var H,B;const v=o||null,w=e==="target",b=Lt(),_=iP(),{connectOnClick:S,noPanClassName:x,rfId:A}=ut(mne,Ut),{connectingFrom:k,connectingTo:T,clickConnecting:O,isPossibleEndHandle:$,connectionInProcess:L,clickConnectionInProcess:M,valid:z}=ut(gne(_,v,e),Ut);_||(B=(H=b.getState()).onError)==null||B.call(H,"010",Jr.error010());const P=G=>{const{defaultEdgeOptions:K,onConnect:Q,hasDefaultEdges:R}=b.getState(),V={...K,...G};if(R){const{edges:X,setEdges:j}=b.getState();j(zee(V,X))}Q==null||Q(V),l==null||l(V)},q=G=>{if(!_)return;const K=R9(G.nativeEvent);if(i&&(K&&G.button===0||!K)){const Q=b.getState();Pw.onPointerDown(G.nativeEvent,{autoPanOnConnect:Q.autoPanOnConnect,connectionMode:Q.connectionMode,connectionRadius:Q.connectionRadius,domNode:Q.domNode,nodeLookup:Q.nodeLookup,lib:Q.lib,isTarget:w,handleId:v,nodeId:_,flowId:Q.rfId,panBy:Q.panBy,cancelConnection:Q.cancelConnection,onConnectStart:Q.onConnectStart,onConnectEnd:Q.onConnectEnd,updateConnection:Q.updateConnection,onConnect:P,isValidConnection:n||Q.isValidConnection,getTransform:()=>b.getState().transform,getFromHandle:()=>b.getState().connection.fromHandle,autoPanSpeed:Q.autoPanSpeed})}K?d==null||d(G):h==null||h(G)},D=G=>{const{onClickConnectStart:K,onClickConnectEnd:Q,connectionClickStartHandle:R,connectionMode:V,isValidConnection:X,lib:j,rfId:I,nodeLookup:U,connection:Y}=b.getState();if(!_||!R&&!i)return;if(!R){K==null||K(G.nativeEvent,{nodeId:_,handleId:v,handleType:e}),b.setState({connectionClickStartHandle:{nodeId:_,type:e,id:v}});return}const ne=O9(G.target),ae=n||X,{connection:re,isValid:le}=Pw.isValid(G.nativeEvent,{handle:{nodeId:_,id:v,type:e},connectionMode:V,fromNodeId:R.nodeId,fromHandleId:R.id||null,fromType:R.type,isValidConnection:ae,flowId:I,doc:ne,lib:j,nodeLookup:U});le&&re&&P(re);const W=structuredClone(Y);delete W.inProgress,W.toPosition=W.toHandle?W.toHandle.position:null,Q==null||Q(G,W),b.setState({connectionClickStartHandle:null})};return N.jsx("div",{"data-handleid":v,"data-nodeid":_,"data-handlepos":t,"data-id":`${A}-${_}-${v}-${e}`,className:en(["react-flow__handle",`react-flow__handle-${t}`,"nodrag",x,f,{source:!w,target:w,connectable:r,connectablestart:i,connectableend:a,clickconnecting:O,connectingfrom:k,connectingto:T,valid:z,connectionindicator:r&&(!L||$)&&(L||M?a:i)}]),onMouseDown:q,onTouchStart:q,onClick:S?D:void 0,ref:g,...m,children:c})}const ip=te.memo(eP(yne));function bne({data:e,isConnectable:t,sourcePosition:n=Pe.Bottom}){return N.jsxs(N.Fragment,{children:[e==null?void 0:e.label,N.jsx(ip,{type:"source",position:n,isConnectable:t})]})}function vne({data:e,isConnectable:t,targetPosition:n=Pe.Top,sourcePosition:r=Pe.Bottom}){return N.jsxs(N.Fragment,{children:[N.jsx(ip,{type:"target",position:n,isConnectable:t}),e==null?void 0:e.label,N.jsx(ip,{type:"source",position:r,isConnectable:t})]})}function _ne(){return null}function xne({data:e,isConnectable:t,targetPosition:n=Pe.Top}){return N.jsxs(N.Fragment,{children:[N.jsx(ip,{type:"target",position:n,isConnectable:t}),e==null?void 0:e.label]})}const ap={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}},xN={input:bne,default:vne,output:xne,group:_ne};function wne(e){var t,n,r,i;return e.internals.handleBounds===void 0?{width:e.width??e.initialWidth??((t=e.style)==null?void 0:t.width),height:e.height??e.initialHeight??((n=e.style)==null?void 0:n.height)}:{width:e.width??((r=e.style)==null?void 0:r.width),height:e.height??((i=e.style)==null?void 0:i.height)}}const Sne=e=>{const{width:t,height:n,x:r,y:i}=Nc(e.nodeLookup,{filter:a=>!!a.selected});return{width:jr(t)?t:null,height:jr(n)?n:null,userSelectionActive:e.userSelectionActive,transformString:`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]}) translate(${r}px,${i}px)`}};function Ene({onSelectionContextMenu:e,noPanClassName:t,disableKeyboardA11y:n}){const r=Lt(),{width:i,height:a,transformString:o,userSelectionActive:l}=ut(Sne,Ut),c=rP(),f=te.useRef(null);if(te.useEffect(()=>{var m;n||(m=f.current)==null||m.focus({preventScroll:!0})},[n]),nP({nodeRef:f}),l||!i||!a)return null;const d=e?m=>{const g=r.getState().nodes.filter(v=>v.selected);e(m,g)}:void 0,h=m=>{Object.prototype.hasOwnProperty.call(ap,m.key)&&(m.preventDefault(),c({direction:ap[m.key],factor:m.shiftKey?4:1}))};return N.jsx("div",{className:en(["react-flow__nodesselection","react-flow__container",t]),style:{transform:o},children:N.jsx("div",{ref:f,className:"react-flow__nodesselection-rect",onContextMenu:d,tabIndex:n?void 0:-1,onKeyDown:n?void 0:h,style:{width:i,height:a}})})}const wN=typeof window<"u"?window:void 0,kne=e=>({nodesSelectionActive:e.nodesSelectionActive,userSelectionActive:e.userSelectionActive});function aP({children:e,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:r,onPaneMouseLeave:i,onPaneContextMenu:a,onPaneScroll:o,paneClickDistance:l,deleteKeyCode:c,selectionKeyCode:f,selectionOnDrag:d,selectionMode:h,onSelectionStart:m,onSelectionEnd:g,multiSelectionKeyCode:v,panActivationKeyCode:w,zoomActivationKeyCode:b,elementsSelectable:_,zoomOnScroll:S,zoomOnPinch:x,panOnScroll:A,panOnScrollSpeed:k,panOnScrollMode:T,zoomOnDoubleClick:O,panOnDrag:$,defaultViewport:L,translateExtent:M,minZoom:z,maxZoom:P,preventScrolling:q,onSelectionContextMenu:D,noWheelClassName:H,noPanClassName:B,disableKeyboardA11y:G,onViewportChange:K,isControlledViewport:Q}){const{nodesSelectionActive:R,userSelectionActive:V}=ut(kne),X=pc(f,{target:wN}),j=pc(w,{target:wN}),I=j||$,U=j||A,Y=d&&I!==!0,ne=X||V||Y;return ane({deleteKeyCode:c,multiSelectionKeyCode:v}),N.jsx(lne,{onPaneContextMenu:a,elementsSelectable:_,zoomOnScroll:S,zoomOnPinch:x,panOnScroll:U,panOnScrollSpeed:k,panOnScrollMode:T,zoomOnDoubleClick:O,panOnDrag:!X&&I,defaultViewport:L,translateExtent:M,minZoom:z,maxZoom:P,zoomActivationKeyCode:b,preventScrolling:q,noWheelClassName:H,noPanClassName:B,onViewportChange:K,isControlledViewport:Q,paneClickDistance:l,children:N.jsxs(dne,{onSelectionStart:m,onSelectionEnd:g,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:r,onPaneMouseLeave:i,onPaneContextMenu:a,onPaneScroll:o,panOnDrag:I,isSelecting:!!ne,selectionMode:h,selectionKeyPressed:X,selectionOnDrag:Y,children:[e,R&&N.jsx(Ene,{onSelectionContextMenu:D,noPanClassName:B,disableKeyboardA11y:G})]})})}aP.displayName="FlowRenderer";const Ane=te.memo(aP),Tne=e=>t=>e?w9(t.nodeLookup,{x:0,y:0,width:t.width,height:t.height},t.transform,!0).map(n=>n.id):Array.from(t.nodeLookup.keys());function Cne(e){return ut(te.useCallback(Tne(e),[e]),Ut)}const One=e=>e.updateNodeInternals;function Nne(){const e=ut(One),[t]=te.useState(()=>typeof ResizeObserver>"u"?null:new ResizeObserver(n=>{const r=new Map;n.forEach(i=>{const a=i.target.getAttribute("data-id");r.set(a,{id:a,nodeElement:i.target,force:!0})}),e(r)}));return te.useEffect(()=>()=>{t==null||t.disconnect()},[t]),t}function Rne({node:e,nodeType:t,hasDimensions:n,resizeObserver:r}){const i=Lt(),a=te.useRef(null),o=te.useRef(null),l=te.useRef(e.sourcePosition),c=te.useRef(e.targetPosition),f=te.useRef(t),d=n&&!!e.internals.handleBounds;return te.useEffect(()=>{a.current&&!e.hidden&&(!d||o.current!==a.current)&&(o.current&&(r==null||r.unobserve(o.current)),r==null||r.observe(a.current),o.current=a.current)},[d,e.hidden]),te.useEffect(()=>()=>{o.current&&(r==null||r.unobserve(o.current),o.current=null)},[]),te.useEffect(()=>{if(a.current){const h=f.current!==t,m=l.current!==e.sourcePosition,g=c.current!==e.targetPosition;(h||m||g)&&(f.current=t,l.current=e.sourcePosition,c.current=e.targetPosition,i.getState().updateNodeInternals(new Map([[e.id,{id:e.id,nodeElement:a.current,force:!0}]])))}},[e.id,t,e.sourcePosition,e.targetPosition]),a}function jne({id:e,onClick:t,onMouseEnter:n,onMouseMove:r,onMouseLeave:i,onContextMenu:a,onDoubleClick:o,nodesDraggable:l,elementsSelectable:c,nodesConnectable:f,nodesFocusable:d,resizeObserver:h,noDragClassName:m,noPanClassName:g,disableKeyboardA11y:v,rfId:w,nodeTypes:b,nodeClickDistance:_,onError:S}){const{node:x,internals:A,isParent:k}=ut(ne=>{const ae=ne.nodeLookup.get(e),re=ne.parentLookup.has(e);return{node:ae,internals:ae.internals,isParent:re}},Ut);let T=x.type||"default",O=(b==null?void 0:b[T])||xN[T];O===void 0&&(S==null||S("003",Jr.error003(T)),T="default",O=xN.default);const $=!!(x.draggable||l&&typeof x.draggable>"u"),L=!!(x.selectable||c&&typeof x.selectable>"u"),M=!!(x.connectable||f&&typeof x.connectable>"u"),z=!!(x.focusable||d&&typeof x.focusable>"u"),P=Lt(),q=T9(x),D=Rne({node:x,nodeType:T,hasDimensions:q,resizeObserver:h}),H=nP({nodeRef:D,disabled:x.hidden||!$,noDragClassName:m,handleSelector:x.dragHandle,nodeId:e,isSelectable:L,nodeClickDistance:_}),B=rP();if(x.hidden)return null;const G=zi(x),K=wne(x),Q=L||$||t||n||r||i,R=n?ne=>n(ne,{...A.userNode}):void 0,V=r?ne=>r(ne,{...A.userNode}):void 0,X=i?ne=>i(ne,{...A.userNode}):void 0,j=a?ne=>a(ne,{...A.userNode}):void 0,I=o?ne=>o(ne,{...A.userNode}):void 0,U=ne=>{const{selectNodesOnDrag:ae,nodeDragThreshold:re}=P.getState();L&&(!ae||!$||re>0)&&Lw({id:e,store:P,nodeRef:D}),t&&t(ne,{...A.userNode})},Y=ne=>{if(!(N9(ne.nativeEvent)||v))if(b9.includes(ne.key)&&L){const ae=ne.key==="Escape";Lw({id:e,store:P,unselect:ae,nodeRef:D})}else $&&x.selected&&Object.prototype.hasOwnProperty.call(ap,ne.key)&&(ne.preventDefault(),P.setState({ariaLiveMessage:`Moved selected node ${ne.key.replace("Arrow","").toLowerCase()}. New position, x: ${~~A.positionAbsolute.x}, y: ${~~A.positionAbsolute.y}`}),B({direction:ap[ne.key],factor:ne.shiftKey?4:1}))};return N.jsx("div",{className:en(["react-flow__node",`react-flow__node-${T}`,{[g]:$},x.className,{selected:x.selected,selectable:L,parent:k,draggable:$,dragging:H}]),ref:D,style:{zIndex:A.z,transform:`translate(${A.positionAbsolute.x}px,${A.positionAbsolute.y}px)`,pointerEvents:Q?"all":"none",visibility:q?"visible":"hidden",...x.style,...K},"data-id":e,"data-testid":`rf__node-${e}`,onMouseEnter:R,onMouseMove:V,onMouseLeave:X,onContextMenu:j,onClick:U,onDoubleClick:I,onKeyDown:z?Y:void 0,tabIndex:z?0:void 0,role:z?"button":void 0,"aria-describedby":v?void 0:`${Z9}-${w}`,"aria-label":x.ariaLabel,children:N.jsx(pne,{value:e,children:N.jsx(O,{id:e,data:x.data,type:T,positionAbsoluteX:A.positionAbsolute.x,positionAbsoluteY:A.positionAbsolute.y,selected:x.selected??!1,selectable:L,draggable:$,deletable:x.deletable??!0,isConnectable:M,sourcePosition:x.sourcePosition,targetPosition:x.targetPosition,dragging:H,dragHandle:x.dragHandle,zIndex:A.z,parentId:x.parentId,...G})})})}const Mne=e=>({nodesDraggable:e.nodesDraggable,nodesConnectable:e.nodesConnectable,nodesFocusable:e.nodesFocusable,elementsSelectable:e.elementsSelectable,onError:e.onError});function sP(e){const{nodesDraggable:t,nodesConnectable:n,nodesFocusable:r,elementsSelectable:i,onError:a}=ut(Mne,Ut),o=Cne(e.onlyRenderVisibleElements),l=Nne();return N.jsx("div",{className:"react-flow__nodes",style:Pp,children:o.map(c=>N.jsx(jne,{id:c,nodeTypes:e.nodeTypes,nodeExtent:e.nodeExtent,onClick:e.onNodeClick,onMouseEnter:e.onNodeMouseEnter,onMouseMove:e.onNodeMouseMove,onMouseLeave:e.onNodeMouseLeave,onContextMenu:e.onNodeContextMenu,onDoubleClick:e.onNodeDoubleClick,noDragClassName:e.noDragClassName,noPanClassName:e.noPanClassName,rfId:e.rfId,disableKeyboardA11y:e.disableKeyboardA11y,resizeObserver:l,nodesDraggable:t,nodesConnectable:n,nodesFocusable:r,elementsSelectable:i,nodeClickDistance:e.nodeClickDistance,onError:a},c))})}sP.displayName="NodeRenderer";const $ne=te.memo(sP);function Dne(e){return ut(te.useCallback(n=>{if(!e)return n.edges.map(i=>i.id);const r=[];if(n.width&&n.height)for(const i of n.edges){const a=n.nodeLookup.get(i.source),o=n.nodeLookup.get(i.target);a&&o&&Iee({sourceNode:a,targetNode:o,width:n.width,height:n.height,transform:n.transform})&&r.push(i.id)}return r},[e]),Ut)}const Ine=({color:e="none",strokeWidth:t=1})=>N.jsx("polyline",{style:{stroke:e,strokeWidth:t},strokeLinecap:"round",strokeLinejoin:"round",fill:"none",points:"-5,-4 0,0 -5,4"}),Pne=({color:e="none",strokeWidth:t=1})=>N.jsx("polyline",{style:{stroke:e,fill:e,strokeWidth:t},strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"}),SN={[ep.Arrow]:Ine,[ep.ArrowClosed]:Pne};function Lne(e){const t=Lt();return te.useMemo(()=>{var i,a;return Object.prototype.hasOwnProperty.call(SN,e)?SN[e]:((a=(i=t.getState()).onError)==null||a.call(i,"009",Jr.error009(e)),null)},[e])}const zne=({id:e,type:t,color:n,width:r=12.5,height:i=12.5,markerUnits:a="strokeWidth",strokeWidth:o,orient:l="auto-start-reverse"})=>{const c=Lne(t);return c?N.jsx("marker",{className:"react-flow__arrowhead",id:e,markerWidth:`${r}`,markerHeight:`${i}`,viewBox:"-10 -10 20 20",markerUnits:a,orient:l,refX:"0",refY:"0",children:N.jsx(c,{color:n,strokeWidth:o})}):null},oP=({defaultColor:e,rfId:t})=>{const n=ut(a=>a.edges),r=ut(a=>a.defaultEdgeOptions),i=te.useMemo(()=>Vee(n,{id:t,defaultColor:e,defaultMarkerStart:r==null?void 0:r.markerStart,defaultMarkerEnd:r==null?void 0:r.markerEnd}),[n,r,t,e]);return i.length?N.jsx("svg",{className:"react-flow__marker","aria-hidden":"true",children:N.jsx("defs",{children:i.map(a=>N.jsx(zne,{id:a.id,type:a.type,color:a.color,width:a.width,height:a.height,markerUnits:a.markerUnits,strokeWidth:a.strokeWidth,orient:a.orient},a.id))})}):null};oP.displayName="MarkerDefinitions";var qne=te.memo(oP);function lP({x:e,y:t,label:n,labelStyle:r,labelShowBg:i=!0,labelBgStyle:a,labelBgPadding:o=[2,4],labelBgBorderRadius:l=2,children:c,className:f,...d}){const[h,m]=te.useState({x:1,y:0,width:0,height:0}),g=en(["react-flow__edge-textwrapper",f]),v=te.useRef(null);return te.useEffect(()=>{if(v.current){const w=v.current.getBBox();m({x:w.x,y:w.y,width:w.width,height:w.height})}},[n]),n?N.jsxs("g",{transform:`translate(${e-h.width/2} ${t-h.height/2})`,className:g,visibility:h.width?"visible":"hidden",...d,children:[i&&N.jsx("rect",{width:h.width+2*o[0],x:-o[0],y:-o[1],height:h.height+2*o[1],className:"react-flow__edge-textbg",style:a,rx:l,ry:l}),N.jsx("text",{className:"react-flow__edge-text",y:h.height/2,dy:"0.3em",ref:v,style:r,children:n}),c]}):null}lP.displayName="EdgeText";const Fne=te.memo(lP);function Lp({path:e,labelX:t,labelY:n,label:r,labelStyle:i,labelShowBg:a,labelBgStyle:o,labelBgPadding:l,labelBgBorderRadius:c,interactionWidth:f=20,...d}){return N.jsxs(N.Fragment,{children:[N.jsx("path",{...d,d:e,fill:"none",className:en(["react-flow__edge-path",d.className])}),f&&N.jsx("path",{d:e,fill:"none",strokeOpacity:0,strokeWidth:f,className:"react-flow__edge-interaction"}),r&&jr(t)&&jr(n)?N.jsx(Fne,{x:t,y:n,label:r,labelStyle:i,labelShowBg:a,labelBgStyle:o,labelBgPadding:l,labelBgBorderRadius:c}):null]})}function EN({pos:e,x1:t,y1:n,x2:r,y2:i}){return e===Pe.Left||e===Pe.Right?[.5*(t+r),n]:[t,.5*(n+i)]}function uP({sourceX:e,sourceY:t,sourcePosition:n=Pe.Bottom,targetX:r,targetY:i,targetPosition:a=Pe.Top}){const[o,l]=EN({pos:n,x1:e,y1:t,x2:r,y2:i}),[c,f]=EN({pos:a,x1:r,y1:i,x2:e,y2:t}),[d,h,m,g]=j9({sourceX:e,sourceY:t,targetX:r,targetY:i,sourceControlX:o,sourceControlY:l,targetControlX:c,targetControlY:f});return[`M${e},${t} C${o},${l} ${c},${f} ${r},${i}`,d,h,m,g]}function cP(e){return te.memo(({id:t,sourceX:n,sourceY:r,targetX:i,targetY:a,sourcePosition:o,targetPosition:l,label:c,labelStyle:f,labelShowBg:d,labelBgStyle:h,labelBgPadding:m,labelBgBorderRadius:g,style:v,markerEnd:w,markerStart:b,interactionWidth:_})=>{const[S,x,A]=uP({sourceX:n,sourceY:r,sourcePosition:o,targetX:i,targetY:a,targetPosition:l}),k=e.isInternal?void 0:t;return N.jsx(Lp,{id:k,path:S,labelX:x,labelY:A,label:c,labelStyle:f,labelShowBg:d,labelBgStyle:h,labelBgPadding:m,labelBgBorderRadius:g,style:v,markerEnd:w,markerStart:b,interactionWidth:_})})}const Bne=cP({isInternal:!1}),fP=cP({isInternal:!0});Bne.displayName="SimpleBezierEdge";fP.displayName="SimpleBezierEdgeInternal";function dP(e){return te.memo(({id:t,sourceX:n,sourceY:r,targetX:i,targetY:a,label:o,labelStyle:l,labelShowBg:c,labelBgStyle:f,labelBgPadding:d,labelBgBorderRadius:h,style:m,sourcePosition:g=Pe.Bottom,targetPosition:v=Pe.Top,markerEnd:w,markerStart:b,pathOptions:_,interactionWidth:S})=>{const[x,A,k]=$w({sourceX:n,sourceY:r,sourcePosition:g,targetX:i,targetY:a,targetPosition:v,borderRadius:_==null?void 0:_.borderRadius,offset:_==null?void 0:_.offset}),T=e.isInternal?void 0:t;return N.jsx(Lp,{id:T,path:x,labelX:A,labelY:k,label:o,labelStyle:l,labelShowBg:c,labelBgStyle:f,labelBgPadding:d,labelBgBorderRadius:h,style:m,markerEnd:w,markerStart:b,interactionWidth:S})})}const hP=dP({isInternal:!1}),pP=dP({isInternal:!0});hP.displayName="SmoothStepEdge";pP.displayName="SmoothStepEdgeInternal";function mP(e){return te.memo(({id:t,...n})=>{var i;const r=e.isInternal?void 0:t;return N.jsx(hP,{...n,id:r,pathOptions:te.useMemo(()=>{var a;return{borderRadius:0,offset:(a=n.pathOptions)==null?void 0:a.offset}},[(i=n.pathOptions)==null?void 0:i.offset])})})}const Une=mP({isInternal:!1}),gP=mP({isInternal:!0});Une.displayName="StepEdge";gP.displayName="StepEdgeInternal";function yP(e){return te.memo(({id:t,sourceX:n,sourceY:r,targetX:i,targetY:a,label:o,labelStyle:l,labelShowBg:c,labelBgStyle:f,labelBgPadding:d,labelBgBorderRadius:h,style:m,markerEnd:g,markerStart:v,interactionWidth:w})=>{const[b,_,S]=D9({sourceX:n,sourceY:r,targetX:i,targetY:a}),x=e.isInternal?void 0:t;return N.jsx(Lp,{id:x,path:b,labelX:_,labelY:S,label:o,labelStyle:l,labelShowBg:c,labelBgStyle:f,labelBgPadding:d,labelBgBorderRadius:h,style:m,markerEnd:g,markerStart:v,interactionWidth:w})})}const Vne=yP({isInternal:!1}),bP=yP({isInternal:!0});Vne.displayName="StraightEdge";bP.displayName="StraightEdgeInternal";function vP(e){return te.memo(({id:t,sourceX:n,sourceY:r,targetX:i,targetY:a,sourcePosition:o=Pe.Bottom,targetPosition:l=Pe.Top,label:c,labelStyle:f,labelShowBg:d,labelBgStyle:h,labelBgPadding:m,labelBgBorderRadius:g,style:v,markerEnd:w,markerStart:b,pathOptions:_,interactionWidth:S})=>{const[x,A,k]=M9({sourceX:n,sourceY:r,sourcePosition:o,targetX:i,targetY:a,targetPosition:l,curvature:_==null?void 0:_.curvature}),T=e.isInternal?void 0:t;return N.jsx(Lp,{id:T,path:x,labelX:A,labelY:k,label:c,labelStyle:f,labelShowBg:d,labelBgStyle:h,labelBgPadding:m,labelBgBorderRadius:g,style:v,markerEnd:w,markerStart:b,interactionWidth:S})})}const Hne=vP({isInternal:!1}),_P=vP({isInternal:!0});Hne.displayName="BezierEdge";_P.displayName="BezierEdgeInternal";const kN={default:_P,straight:bP,step:gP,smoothstep:pP,simplebezier:fP},AN={sourceX:null,sourceY:null,targetX:null,targetY:null,sourcePosition:null,targetPosition:null},Gne=(e,t,n)=>n===Pe.Left?e-t:n===Pe.Right?e+t:e,Yne=(e,t,n)=>n===Pe.Top?e-t:n===Pe.Bottom?e+t:e,TN="react-flow__edgeupdater";function CN({position:e,centerX:t,centerY:n,radius:r=10,onMouseDown:i,onMouseEnter:a,onMouseOut:o,type:l}){return N.jsx("circle",{onMouseDown:i,onMouseEnter:a,onMouseOut:o,className:en([TN,`${TN}-${l}`]),cx:Gne(t,r,e),cy:Yne(n,r,e),r,stroke:"transparent",fill:"transparent"})}function Zne({isReconnectable:e,reconnectRadius:t,edge:n,sourceX:r,sourceY:i,targetX:a,targetY:o,sourcePosition:l,targetPosition:c,onReconnect:f,onReconnectStart:d,onReconnectEnd:h,setReconnecting:m,setUpdateHover:g}){const v=Lt(),w=(A,k)=>{if(A.button!==0)return;const{autoPanOnConnect:T,domNode:O,isValidConnection:$,connectionMode:L,connectionRadius:M,lib:z,onConnectStart:P,onConnectEnd:q,cancelConnection:D,nodeLookup:H,rfId:B,panBy:G,updateConnection:K}=v.getState(),Q=k.type==="target";m(!0),d==null||d(A,n,k.type);const R=(X,j)=>{m(!1),h==null||h(X,n,k.type,j)},V=X=>f==null?void 0:f(n,X);Pw.onPointerDown(A.nativeEvent,{autoPanOnConnect:T,connectionMode:L,connectionRadius:M,domNode:O,handleId:k.id,nodeId:k.nodeId,nodeLookup:H,isTarget:Q,edgeUpdaterType:k.type,lib:z,flowId:B,cancelConnection:D,panBy:G,isValidConnection:$,onConnect:V,onConnectStart:P,onConnectEnd:q,onReconnectEnd:R,updateConnection:K,getTransform:()=>v.getState().transform,getFromHandle:()=>v.getState().connection.fromHandle})},b=A=>w(A,{nodeId:n.target,id:n.targetHandle??null,type:"target"}),_=A=>w(A,{nodeId:n.source,id:n.sourceHandle??null,type:"source"}),S=()=>g(!0),x=()=>g(!1);return N.jsxs(N.Fragment,{children:[(e===!0||e==="source")&&N.jsx(CN,{position:l,centerX:r,centerY:i,radius:t,onMouseDown:b,onMouseEnter:S,onMouseOut:x,type:"source"}),(e===!0||e==="target")&&N.jsx(CN,{position:c,centerX:a,centerY:o,radius:t,onMouseDown:_,onMouseEnter:S,onMouseOut:x,type:"target"})]})}function Kne({id:e,edgesFocusable:t,edgesReconnectable:n,elementsSelectable:r,onClick:i,onDoubleClick:a,onContextMenu:o,onMouseEnter:l,onMouseMove:c,onMouseLeave:f,reconnectRadius:d,onReconnect:h,onReconnectStart:m,onReconnectEnd:g,rfId:v,edgeTypes:w,noPanClassName:b,onError:_,disableKeyboardA11y:S}){let x=ut(J=>J.edgeLookup.get(e));const A=ut(J=>J.defaultEdgeOptions);x=A?{...A,...x}:x;let k=x.type||"default",T=(w==null?void 0:w[k])||kN[k];T===void 0&&(_==null||_("011",Jr.error011(k)),k="default",T=kN.default);const O=!!(x.focusable||t&&typeof x.focusable>"u"),$=typeof h<"u"&&(x.reconnectable||n&&typeof x.reconnectable>"u"),L=!!(x.selectable||r&&typeof x.selectable>"u"),M=te.useRef(null),[z,P]=te.useState(!1),[q,D]=te.useState(!1),H=Lt(),{zIndex:B,sourceX:G,sourceY:K,targetX:Q,targetY:R,sourcePosition:V,targetPosition:X}=ut(te.useCallback(J=>{const se=J.nodeLookup.get(x.source),fe=J.nodeLookup.get(x.target);if(!se||!fe)return{zIndex:x.zIndex,...AN};const me=Uee({id:e,sourceNode:se,targetNode:fe,sourceHandle:x.sourceHandle||null,targetHandle:x.targetHandle||null,connectionMode:J.connectionMode,onError:_});return{zIndex:Dee({selected:x.selected,zIndex:x.zIndex,sourceNode:se,targetNode:fe,elevateOnSelect:J.elevateEdgesOnSelect}),...me||AN}},[x.source,x.target,x.sourceHandle,x.targetHandle,x.selected,x.zIndex]),Ut),j=te.useMemo(()=>x.markerStart?`url('#${Dw(x.markerStart,v)}')`:void 0,[x.markerStart,v]),I=te.useMemo(()=>x.markerEnd?`url('#${Dw(x.markerEnd,v)}')`:void 0,[x.markerEnd,v]);if(x.hidden||G===null||K===null||Q===null||R===null)return null;const U=J=>{var xe;const{addSelectedEdges:se,unselectNodesAndEdges:fe,multiSelectionActive:me}=H.getState();L&&(H.setState({nodesSelectionActive:!1}),x.selected&&me?(fe({nodes:[],edges:[x]}),(xe=M.current)==null||xe.blur()):se([e])),i&&i(J,x)},Y=a?J=>{a(J,{...x})}:void 0,ne=o?J=>{o(J,{...x})}:void 0,ae=l?J=>{l(J,{...x})}:void 0,re=c?J=>{c(J,{...x})}:void 0,le=f?J=>{f(J,{...x})}:void 0,W=J=>{var se;if(!S&&b9.includes(J.key)&&L){const{unselectNodesAndEdges:fe,addSelectedEdges:me}=H.getState();J.key==="Escape"?((se=M.current)==null||se.blur(),fe({edges:[x]})):me([e])}};return N.jsx("svg",{style:{zIndex:B},children:N.jsxs("g",{className:en(["react-flow__edge",`react-flow__edge-${k}`,x.className,b,{selected:x.selected,animated:x.animated,inactive:!L&&!i,updating:z,selectable:L}]),onClick:U,onDoubleClick:Y,onContextMenu:ne,onMouseEnter:ae,onMouseMove:re,onMouseLeave:le,onKeyDown:O?W:void 0,tabIndex:O?0:void 0,role:O?"button":"img","data-id":e,"data-testid":`rf__edge-${e}`,"aria-label":x.ariaLabel===null?void 0:x.ariaLabel||`Edge from ${x.source} to ${x.target}`,"aria-describedby":O?`${K9}-${v}`:void 0,ref:M,children:[!q&&N.jsx(T,{id:e,source:x.source,target:x.target,type:x.type,selected:x.selected,animated:x.animated,selectable:L,deletable:x.deletable??!0,label:x.label,labelStyle:x.labelStyle,labelShowBg:x.labelShowBg,labelBgStyle:x.labelBgStyle,labelBgPadding:x.labelBgPadding,labelBgBorderRadius:x.labelBgBorderRadius,sourceX:G,sourceY:K,targetX:Q,targetY:R,sourcePosition:V,targetPosition:X,data:x.data,style:x.style,sourceHandleId:x.sourceHandle,targetHandleId:x.targetHandle,markerStart:j,markerEnd:I,pathOptions:"pathOptions"in x?x.pathOptions:void 0,interactionWidth:x.interactionWidth}),$&&N.jsx(Zne,{edge:x,isReconnectable:$,reconnectRadius:d,onReconnect:h,onReconnectStart:m,onReconnectEnd:g,sourceX:G,sourceY:K,targetX:Q,targetY:R,sourcePosition:V,targetPosition:X,setUpdateHover:P,setReconnecting:D})]})})}const Xne=e=>({edgesFocusable:e.edgesFocusable,edgesReconnectable:e.edgesReconnectable,elementsSelectable:e.elementsSelectable,connectionMode:e.connectionMode,onError:e.onError});function xP({defaultMarkerColor:e,onlyRenderVisibleElements:t,rfId:n,edgeTypes:r,noPanClassName:i,onReconnect:a,onEdgeContextMenu:o,onEdgeMouseEnter:l,onEdgeMouseMove:c,onEdgeMouseLeave:f,onEdgeClick:d,reconnectRadius:h,onEdgeDoubleClick:m,onReconnectStart:g,onReconnectEnd:v,disableKeyboardA11y:w}){const{edgesFocusable:b,edgesReconnectable:_,elementsSelectable:S,onError:x}=ut(Xne,Ut),A=Dne(t);return N.jsxs("div",{className:"react-flow__edges",children:[N.jsx(qne,{defaultColor:e,rfId:n}),A.map(k=>N.jsx(Kne,{id:k,edgesFocusable:b,edgesReconnectable:_,elementsSelectable:S,noPanClassName:i,onReconnect:a,onContextMenu:o,onMouseEnter:l,onMouseMove:c,onMouseLeave:f,onClick:d,reconnectRadius:h,onDoubleClick:m,onReconnectStart:g,onReconnectEnd:v,rfId:n,onError:x,edgeTypes:r,disableKeyboardA11y:w},k))]})}xP.displayName="EdgeRenderer";const Wne=te.memo(xP),Qne=e=>`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`;function Jne({children:e}){const t=ut(Qne);return N.jsx("div",{className:"react-flow__viewport xyflow__viewport react-flow__container",style:{transform:t},children:e})}function ere(e){const t=Ip(),n=te.useRef(!1);te.useEffect(()=>{!n.current&&t.viewportInitialized&&e&&(setTimeout(()=>e(t),1),n.current=!0)},[e,t.viewportInitialized])}const tre=e=>{var t;return(t=e.panZoom)==null?void 0:t.syncViewport};function nre(e){const t=ut(tre),n=Lt();return te.useEffect(()=>{e&&(t==null||t(e),n.setState({transform:[e.x,e.y,e.zoom]}))},[e,t]),null}function rre(e){return e.connection.inProgress?{...e.connection,to:Rc(e.connection.to,e.transform)}:{...e.connection}}function ire(e){return rre}function are(e){const t=ire();return ut(t,Ut)}const sre=e=>({nodesConnectable:e.nodesConnectable,isValid:e.connection.isValid,inProgress:e.connection.inProgress,width:e.width,height:e.height});function ore({containerStyle:e,style:t,type:n,component:r}){const{nodesConnectable:i,width:a,height:o,isValid:l,inProgress:c}=ut(sre,Ut);return!(a&&i&&c)?null:N.jsx("svg",{style:e,width:a,height:o,className:"react-flow__connectionline react-flow__container",children:N.jsx("g",{className:en(["react-flow__connection",_9(l)]),children:N.jsx(wP,{style:t,type:n,CustomComponent:r,isValid:l})})})}const wP=({style:e,type:t=Ca.Bezier,CustomComponent:n,isValid:r})=>{const{inProgress:i,from:a,fromNode:o,fromHandle:l,fromPosition:c,to:f,toNode:d,toHandle:h,toPosition:m}=are();if(!i)return;if(n)return N.jsx(n,{connectionLineType:t,connectionLineStyle:e,fromNode:o,fromHandle:l,fromX:a.x,fromY:a.y,toX:f.x,toY:f.y,fromPosition:c,toPosition:m,connectionStatus:_9(r),toNode:d,toHandle:h});let g="";const v={sourceX:a.x,sourceY:a.y,sourcePosition:c,targetX:f.x,targetY:f.y,targetPosition:m};switch(t){case Ca.Bezier:[g]=M9(v);break;case Ca.SimpleBezier:[g]=uP(v);break;case Ca.Step:[g]=$w({...v,borderRadius:0});break;case Ca.SmoothStep:[g]=$w(v);break;default:[g]=D9(v)}return N.jsx("path",{d:g,fill:"none",className:"react-flow__connection-path",style:e})};wP.displayName="ConnectionLine";const lre={};function ON(e=lre){te.useRef(e),Lt(),te.useEffect(()=>{},[e])}function ure(){Lt(),te.useRef(!1),te.useEffect(()=>{},[])}function SP({nodeTypes:e,edgeTypes:t,onInit:n,onNodeClick:r,onEdgeClick:i,onNodeDoubleClick:a,onEdgeDoubleClick:o,onNodeMouseEnter:l,onNodeMouseMove:c,onNodeMouseLeave:f,onNodeContextMenu:d,onSelectionContextMenu:h,onSelectionStart:m,onSelectionEnd:g,connectionLineType:v,connectionLineStyle:w,connectionLineComponent:b,connectionLineContainerStyle:_,selectionKeyCode:S,selectionOnDrag:x,selectionMode:A,multiSelectionKeyCode:k,panActivationKeyCode:T,zoomActivationKeyCode:O,deleteKeyCode:$,onlyRenderVisibleElements:L,elementsSelectable:M,defaultViewport:z,translateExtent:P,minZoom:q,maxZoom:D,preventScrolling:H,defaultMarkerColor:B,zoomOnScroll:G,zoomOnPinch:K,panOnScroll:Q,panOnScrollSpeed:R,panOnScrollMode:V,zoomOnDoubleClick:X,panOnDrag:j,onPaneClick:I,onPaneMouseEnter:U,onPaneMouseMove:Y,onPaneMouseLeave:ne,onPaneScroll:ae,onPaneContextMenu:re,paneClickDistance:le,nodeClickDistance:W,onEdgeContextMenu:J,onEdgeMouseEnter:se,onEdgeMouseMove:fe,onEdgeMouseLeave:me,reconnectRadius:xe,onReconnect:we,onReconnectStart:Ve,onReconnectEnd:qe,noDragClassName:We,noWheelClassName:He,noPanClassName:$e,disableKeyboardA11y:Be,nodeExtent:Ot,rfId:kt,viewport:pe,onViewportChange:_e}){return ON(e),ON(t),ure(),ere(n),nre(pe),N.jsx(Ane,{onPaneClick:I,onPaneMouseEnter:U,onPaneMouseMove:Y,onPaneMouseLeave:ne,onPaneContextMenu:re,onPaneScroll:ae,paneClickDistance:le,deleteKeyCode:$,selectionKeyCode:S,selectionOnDrag:x,selectionMode:A,onSelectionStart:m,onSelectionEnd:g,multiSelectionKeyCode:k,panActivationKeyCode:T,zoomActivationKeyCode:O,elementsSelectable:M,zoomOnScroll:G,zoomOnPinch:K,zoomOnDoubleClick:X,panOnScroll:Q,panOnScrollSpeed:R,panOnScrollMode:V,panOnDrag:j,defaultViewport:z,translateExtent:P,minZoom:q,maxZoom:D,onSelectionContextMenu:h,preventScrolling:H,noDragClassName:We,noWheelClassName:He,noPanClassName:$e,disableKeyboardA11y:Be,onViewportChange:_e,isControlledViewport:!!pe,children:N.jsxs(Jne,{children:[N.jsx(Wne,{edgeTypes:t,onEdgeClick:i,onEdgeDoubleClick:o,onReconnect:we,onReconnectStart:Ve,onReconnectEnd:qe,onlyRenderVisibleElements:L,onEdgeContextMenu:J,onEdgeMouseEnter:se,onEdgeMouseMove:fe,onEdgeMouseLeave:me,reconnectRadius:xe,defaultMarkerColor:B,noPanClassName:$e,disableKeyboardA11y:Be,rfId:kt}),N.jsx(ore,{style:w,type:v,component:b,containerStyle:_}),N.jsx("div",{className:"react-flow__edgelabel-renderer"}),N.jsx($ne,{nodeTypes:e,onNodeClick:r,onNodeDoubleClick:a,onNodeMouseEnter:l,onNodeMouseMove:c,onNodeMouseLeave:f,onNodeContextMenu:d,nodeClickDistance:W,onlyRenderVisibleElements:L,noPanClassName:$e,noDragClassName:We,disableKeyboardA11y:Be,nodeExtent:Ot,rfId:kt}),N.jsx("div",{className:"react-flow__viewport-portal"})]})})}SP.displayName="GraphView";const cre=te.memo(SP),NN=({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,width:i,height:a,fitView:o,fitViewOptions:l,minZoom:c=.5,maxZoom:f=2,nodeOrigin:d,nodeExtent:h}={})=>{const m=new Map,g=new Map,v=new Map,w=new Map,b=r??t??[],_=n??e??[],S=d??[0,0],x=h??cc;P9(v,w,b);const A=Iw(_,m,g,{nodeOrigin:S,nodeExtent:x,elevateNodesOnSelect:!1});let k=[0,0,1];if(o&&i&&a){const T=Nc(m,{filter:M=>!!((M.width||M.initialWidth)&&(M.height||M.initialHeight))}),{x:O,y:$,zoom:L}=OS(T,i,a,c,f,(l==null?void 0:l.padding)??.1);k=[O,$,L]}return{rfId:"1",width:0,height:0,transform:k,nodes:_,nodesInitialized:A,nodeLookup:m,parentLookup:g,edges:b,edgeLookup:w,connectionLookup:v,onNodesChange:null,onEdgesChange:null,hasDefaultNodes:n!==void 0,hasDefaultEdges:r!==void 0,panZoom:null,minZoom:c,maxZoom:f,translateExtent:cc,nodeExtent:x,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionMode:Zo.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:S,nodeDragThreshold:1,snapGrid:[15,15],snapToGrid:!1,nodesDraggable:!0,nodesConnectable:!0,nodesFocusable:!0,edgesFocusable:!0,edgesReconnectable:!0,elementsSelectable:!0,elevateNodesOnSelect:!0,elevateEdgesOnSelect:!1,selectNodesOnDrag:!0,multiSelectionActive:!1,fitViewQueued:o??!1,fitViewOptions:l,fitViewResolver:null,connection:{...v9},connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,autoPanSpeed:15,connectionRadius:20,onError:Nee,isValidConnection:void 0,onSelectionChangeHandlers:[],lib:"react",debug:!1}},fre=({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,width:i,height:a,fitView:o,fitViewOptions:l,minZoom:c,maxZoom:f,nodeOrigin:d,nodeExtent:h})=>Rte((m,g)=>{async function v(){const{nodeLookup:w,panZoom:b,fitViewOptions:_,fitViewResolver:S,width:x,height:A,minZoom:k,maxZoom:T}=g();b&&(await Cee({nodes:w,width:x,height:A,panZoom:b,minZoom:k,maxZoom:T},_),S==null||S.resolve(!0),m({fitViewResolver:null}))}return{...NN({nodes:e,edges:t,width:i,height:a,fitView:o,fitViewOptions:l,minZoom:c,maxZoom:f,nodeOrigin:d,nodeExtent:h,defaultNodes:n,defaultEdges:r}),setNodes:w=>{const{nodeLookup:b,parentLookup:_,nodeOrigin:S,elevateNodesOnSelect:x,fitViewQueued:A}=g(),k=Iw(w,b,_,{nodeOrigin:S,nodeExtent:h,elevateNodesOnSelect:x,checkEquality:!0});A&&k?(v(),m({nodes:w,nodesInitialized:k,fitViewQueued:!1,fitViewOptions:void 0})):m({nodes:w,nodesInitialized:k})},setEdges:w=>{const{connectionLookup:b,edgeLookup:_}=g();P9(b,_,w),m({edges:w})},setDefaultNodesAndEdges:(w,b)=>{if(w){const{setNodes:_}=g();_(w),m({hasDefaultNodes:!0})}if(b){const{setEdges:_}=g();_(b),m({hasDefaultEdges:!0})}},updateNodeInternals:w=>{const{triggerNodeChanges:b,nodeLookup:_,parentLookup:S,domNode:x,nodeOrigin:A,nodeExtent:k,debug:T,fitViewQueued:O}=g(),{changes:$,updatedInternals:L}=Kee(w,_,S,x,A,k);L&&(Gee(_,S,{nodeOrigin:A,nodeExtent:k}),O?(v(),m({fitViewQueued:!1,fitViewOptions:void 0})):m({}),($==null?void 0:$.length)>0&&(T&&console.log("React Flow: trigger node changes",$),b==null||b($)))},updateNodePositions:(w,b=!1)=>{const _=[],S=[],{nodeLookup:x,triggerNodeChanges:A}=g();for(const[k,T]of w){const O=x.get(k),$=!!(O!=null&&O.expandParent&&(O!=null&&O.parentId)&&(T!=null&&T.position)),L={id:k,type:"position",position:$?{x:Math.max(0,T.position.x),y:Math.max(0,T.position.y)}:T.position,dragging:b};$&&O.parentId&&_.push({id:k,parentId:O.parentId,rect:{...T.internals.positionAbsolute,width:T.measured.width??0,height:T.measured.height??0}}),S.push(L)}if(_.length>0){const{parentLookup:k,nodeOrigin:T}=g(),O=$S(_,x,k,T);S.push(...O)}A(S)},triggerNodeChanges:w=>{const{onNodesChange:b,setNodes:_,nodes:S,hasDefaultNodes:x,debug:A}=g();if(w!=null&&w.length){if(x){const k=Q9(w,S);_(k)}A&&console.log("React Flow: trigger node changes",w),b==null||b(w)}},triggerEdgeChanges:w=>{const{onEdgesChange:b,setEdges:_,edges:S,hasDefaultEdges:x,debug:A}=g();if(w!=null&&w.length){if(x){const k=J9(w,S);_(k)}A&&console.log("React Flow: trigger edge changes",w),b==null||b(w)}},addSelectedNodes:w=>{const{multiSelectionActive:b,edgeLookup:_,nodeLookup:S,triggerNodeChanges:x,triggerEdgeChanges:A}=g();if(b){const k=w.map(T=>ls(T,!0));x(k);return}x(Do(S,new Set([...w]),!0)),A(Do(_))},addSelectedEdges:w=>{const{multiSelectionActive:b,edgeLookup:_,nodeLookup:S,triggerNodeChanges:x,triggerEdgeChanges:A}=g();if(b){const k=w.map(T=>ls(T,!0));A(k);return}A(Do(_,new Set([...w]))),x(Do(S,new Set,!0))},unselectNodesAndEdges:({nodes:w,edges:b}={})=>{const{edges:_,nodes:S,nodeLookup:x,triggerNodeChanges:A,triggerEdgeChanges:k}=g(),T=w||S,O=b||_,$=T.map(M=>{const z=x.get(M.id);return z&&(z.selected=!1),ls(M.id,!1)}),L=O.map(M=>ls(M.id,!1));A($),k(L)},setMinZoom:w=>{const{panZoom:b,maxZoom:_}=g();b==null||b.setScaleExtent([w,_]),m({minZoom:w})},setMaxZoom:w=>{const{panZoom:b,minZoom:_}=g();b==null||b.setScaleExtent([_,w]),m({maxZoom:w})},setTranslateExtent:w=>{var b;(b=g().panZoom)==null||b.setTranslateExtent(w),m({translateExtent:w})},setPaneClickDistance:w=>{var b;(b=g().panZoom)==null||b.setClickDistance(w)},resetSelectedElements:()=>{const{edges:w,nodes:b,triggerNodeChanges:_,triggerEdgeChanges:S,elementsSelectable:x}=g();if(!x)return;const A=b.reduce((T,O)=>O.selected?[...T,ls(O.id,!1)]:T,[]),k=w.reduce((T,O)=>O.selected?[...T,ls(O.id,!1)]:T,[]);_(A),S(k)},setNodeExtent:w=>{const{nodes:b,nodeLookup:_,parentLookup:S,nodeOrigin:x,elevateNodesOnSelect:A,nodeExtent:k}=g();w[0][0]===k[0][0]&&w[0][1]===k[0][1]&&w[1][0]===k[1][0]&&w[1][1]===k[1][1]||(Iw(b,_,S,{nodeOrigin:x,nodeExtent:w,elevateNodesOnSelect:A,checkEquality:!1}),m({nodeExtent:w}))},panBy:w=>{const{transform:b,width:_,height:S,panZoom:x,translateExtent:A}=g();return Xee({delta:w,panZoom:x,transform:b,translateExtent:A,width:_,height:S})},cancelConnection:()=>{m({connection:{...v9}})},updateConnection:w=>{m({connection:w})},reset:()=>m({...NN()})}},Object.is);function EP({initialNodes:e,initialEdges:t,defaultNodes:n,defaultEdges:r,initialWidth:i,initialHeight:a,initialMinZoom:o,initialMaxZoom:l,initialFitViewOptions:c,fitView:f,nodeOrigin:d,nodeExtent:h,children:m}){const[g]=te.useState(()=>fre({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,width:i,height:a,fitView:f,minZoom:o,maxZoom:l,fitViewOptions:c,nodeOrigin:d,nodeExtent:h}));return N.jsx(jte,{value:g,children:N.jsx(tne,{children:m})})}function dre({children:e,nodes:t,edges:n,defaultNodes:r,defaultEdges:i,width:a,height:o,fitView:l,fitViewOptions:c,minZoom:f,maxZoom:d,nodeOrigin:h,nodeExtent:m}){return te.useContext(Dp)?N.jsx(N.Fragment,{children:e}):N.jsx(EP,{initialNodes:t,initialEdges:n,defaultNodes:r,defaultEdges:i,initialWidth:a,initialHeight:o,fitView:l,initialFitViewOptions:c,initialMinZoom:f,initialMaxZoom:d,nodeOrigin:h,nodeExtent:m,children:e})}const hre={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0};function pre({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,className:i,nodeTypes:a,edgeTypes:o,onNodeClick:l,onEdgeClick:c,onInit:f,onMove:d,onMoveStart:h,onMoveEnd:m,onConnect:g,onConnectStart:v,onConnectEnd:w,onClickConnectStart:b,onClickConnectEnd:_,onNodeMouseEnter:S,onNodeMouseMove:x,onNodeMouseLeave:A,onNodeContextMenu:k,onNodeDoubleClick:T,onNodeDragStart:O,onNodeDrag:$,onNodeDragStop:L,onNodesDelete:M,onEdgesDelete:z,onDelete:P,onSelectionChange:q,onSelectionDragStart:D,onSelectionDrag:H,onSelectionDragStop:B,onSelectionContextMenu:G,onSelectionStart:K,onSelectionEnd:Q,onBeforeDelete:R,connectionMode:V,connectionLineType:X=Ca.Bezier,connectionLineStyle:j,connectionLineComponent:I,connectionLineContainerStyle:U,deleteKeyCode:Y="Backspace",selectionKeyCode:ne="Shift",selectionOnDrag:ae=!1,selectionMode:re=fc.Full,panActivationKeyCode:le="Space",multiSelectionKeyCode:W=rp()?"Meta":"Control",zoomActivationKeyCode:J=rp()?"Meta":"Control",snapToGrid:se,snapGrid:fe,onlyRenderVisibleElements:me=!1,selectNodesOnDrag:xe,nodesDraggable:we,nodesConnectable:Ve,nodesFocusable:qe,nodeOrigin:We=X9,edgesFocusable:He,edgesReconnectable:$e,elementsSelectable:Be=!0,defaultViewport:Ot=Hte,minZoom:kt=.5,maxZoom:pe=2,translateExtent:_e=cc,preventScrolling:Te=!0,nodeExtent:je,defaultMarkerColor:rt="#b1b1b7",zoomOnScroll:cn=!0,zoomOnPinch:Cn=!0,panOnScroll:$t=!1,panOnScrollSpeed:Gt=.5,panOnScrollMode:wn=bs.Free,zoomOnDoubleClick:Yt=!0,panOnDrag:On=!0,onPaneClick:Bn,onPaneMouseEnter:Hc,onPaneMouseMove:Gc,onPaneMouseLeave:gl,onPaneScroll:za,onPaneContextMenu:bm,paneClickDistance:yl=0,nodeClickDistance:Yc=0,children:bl,onReconnect:vl,onReconnectStart:Zc,onReconnectEnd:vm,onEdgeContextMenu:zr,onEdgeDoubleClick:sn,onEdgeMouseEnter:yn,onEdgeMouseMove:Ui,onEdgeMouseLeave:_l,reconnectRadius:_m=10,onNodesChange:xm,onEdgesChange:Kc,noDragClassName:qa="nodrag",noWheelClassName:xl="nowheel",noPanClassName:si="nopan",fitView:oi,fitViewOptions:Vi,connectOnClick:Hi,attributionPosition:Zt,proOptions:Xc,defaultEdgeOptions:Wc,elevateNodesOnSelect:li,elevateEdgesOnSelect:Gi,disableKeyboardA11y:Qc=!1,autoPanOnConnect:Jc,autoPanOnNodeDrag:ef,autoPanSpeed:wm,connectionRadius:Ps,isValidConnection:Ls,onError:xr,style:wl,id:Sl,nodeDragThreshold:Yi,viewport:El,onViewportChange:kl,width:Sm,height:tf,colorMode:Nn="light",debug:nf,onScroll:zs,...qs},rf){const Zi=Sl||"1",Em=Kte(Nn),Rn=te.useCallback(Fs=>{Fs.currentTarget.scrollTo({top:0,left:0,behavior:"instant"}),zs==null||zs(Fs)},[zs]);return N.jsx("div",{"data-testid":"rf__wrapper",...qs,onScroll:Rn,style:{...wl,...hre},ref:rf,className:en(["react-flow",i,Em]),id:Sl,children:N.jsxs(dre,{nodes:e,edges:t,width:Sm,height:tf,fitView:oi,fitViewOptions:Vi,minZoom:kt,maxZoom:pe,nodeOrigin:We,nodeExtent:je,children:[N.jsx(cre,{onInit:f,onNodeClick:l,onEdgeClick:c,onNodeMouseEnter:S,onNodeMouseMove:x,onNodeMouseLeave:A,onNodeContextMenu:k,onNodeDoubleClick:T,nodeTypes:a,edgeTypes:o,connectionLineType:X,connectionLineStyle:j,connectionLineComponent:I,connectionLineContainerStyle:U,selectionKeyCode:ne,selectionOnDrag:ae,selectionMode:re,deleteKeyCode:Y,multiSelectionKeyCode:W,panActivationKeyCode:le,zoomActivationKeyCode:J,onlyRenderVisibleElements:me,defaultViewport:Ot,translateExtent:_e,minZoom:kt,maxZoom:pe,preventScrolling:Te,zoomOnScroll:cn,zoomOnPinch:Cn,zoomOnDoubleClick:Yt,panOnScroll:$t,panOnScrollSpeed:Gt,panOnScrollMode:wn,panOnDrag:On,onPaneClick:Bn,onPaneMouseEnter:Hc,onPaneMouseMove:Gc,onPaneMouseLeave:gl,onPaneScroll:za,onPaneContextMenu:bm,paneClickDistance:yl,nodeClickDistance:Yc,onSelectionContextMenu:G,onSelectionStart:K,onSelectionEnd:Q,onReconnect:vl,onReconnectStart:Zc,onReconnectEnd:vm,onEdgeContextMenu:zr,onEdgeDoubleClick:sn,onEdgeMouseEnter:yn,onEdgeMouseMove:Ui,onEdgeMouseLeave:_l,reconnectRadius:_m,defaultMarkerColor:rt,noDragClassName:qa,noWheelClassName:xl,noPanClassName:si,rfId:Zi,disableKeyboardA11y:Qc,nodeExtent:je,viewport:El,onViewportChange:kl}),N.jsx(Zte,{nodes:e,edges:t,defaultNodes:n,defaultEdges:r,onConnect:g,onConnectStart:v,onConnectEnd:w,onClickConnectStart:b,onClickConnectEnd:_,nodesDraggable:we,nodesConnectable:Ve,nodesFocusable:qe,edgesFocusable:He,edgesReconnectable:$e,elementsSelectable:Be,elevateNodesOnSelect:li,elevateEdgesOnSelect:Gi,minZoom:kt,maxZoom:pe,nodeExtent:je,onNodesChange:xm,onEdgesChange:Kc,snapToGrid:se,snapGrid:fe,connectionMode:V,translateExtent:_e,connectOnClick:Hi,defaultEdgeOptions:Wc,fitView:oi,fitViewOptions:Vi,onNodesDelete:M,onEdgesDelete:z,onDelete:P,onNodeDragStart:O,onNodeDrag:$,onNodeDragStop:L,onSelectionDrag:H,onSelectionDragStart:D,onSelectionDragStop:B,onMove:d,onMoveStart:h,onMoveEnd:m,noPanClassName:si,nodeOrigin:We,rfId:Zi,autoPanOnConnect:Jc,autoPanOnNodeDrag:ef,autoPanSpeed:wm,onError:xr,connectionRadius:Ps,isValidConnection:Ls,selectNodesOnDrag:xe,nodeDragThreshold:Yi,onBeforeDelete:R,paneClickDistance:yl,debug:nf}),N.jsx(Vte,{onSelectionChange:q}),bl,N.jsx(zte,{proOptions:Xc,position:Zt}),N.jsx(Pte,{rfId:Zi,disableKeyboardA11y:Qc})]})})}var mre=eP(pre);function gre(e){const[t,n]=te.useState(e),r=te.useCallback(i=>n(a=>Q9(i,a)),[]);return[t,n,r]}function yre(e){const[t,n]=te.useState(e),r=te.useCallback(i=>n(a=>J9(i,a)),[]);return[t,n,r]}function bre({dimensions:e,lineWidth:t,variant:n,className:r}){return N.jsx("path",{strokeWidth:t,d:`M${e[0]/2} 0 V${e[1]} M0 ${e[1]/2} H${e[0]}`,className:en(["react-flow__background-pattern",n,r])})}function vre({radius:e,className:t}){return N.jsx("circle",{cx:e,cy:e,r:e,className:en(["react-flow__background-pattern","dots",t])})}var ja;(function(e){e.Lines="lines",e.Dots="dots",e.Cross="cross"})(ja||(ja={}));const _re={[ja.Dots]:1,[ja.Lines]:1,[ja.Cross]:6},xre=e=>({transform:e.transform,patternId:`pattern-${e.rfId}`});function kP({id:e,variant:t=ja.Dots,gap:n=20,size:r,lineWidth:i=1,offset:a=0,color:o,bgColor:l,style:c,className:f,patternClassName:d}){const h=te.useRef(null),{transform:m,patternId:g}=ut(xre,Ut),v=r||_re[t],w=t===ja.Dots,b=t===ja.Cross,_=Array.isArray(n)?n:[n,n],S=[_[0]*m[2]||1,_[1]*m[2]||1],x=v*m[2],A=Array.isArray(a)?a:[a,a],k=b?[x,x]:S,T=[A[0]*m[2]||1+k[0]/2,A[1]*m[2]||1+k[1]/2],O=`${g}${e||""}`;return N.jsxs("svg",{className:en(["react-flow__background",f]),style:{...c,...Pp,"--xy-background-color-props":l,"--xy-background-pattern-color-props":o},ref:h,"data-testid":"rf__background",children:[N.jsx("pattern",{id:O,x:m[0]%S[0],y:m[1]%S[1],width:S[0],height:S[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${T[0]},-${T[1]})`,children:w?N.jsx(vre,{radius:x/2,className:d}):N.jsx(bre,{dimensions:k,lineWidth:i,variant:t,className:d})}),N.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${O})`})]})}kP.displayName="Background";const wre=te.memo(kP);function Sre(){return N.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children:N.jsx("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"})})}function Ere(){return N.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5",children:N.jsx("path",{d:"M0 0h32v4.2H0z"})})}function kre(){return N.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30",children:N.jsx("path",{d:"M3.692 4.63c0-.53.4-.938.939-.938h5.215V0H4.708C2.13 0 0 2.054 0 4.63v5.216h3.692V4.631zM27.354 0h-5.2v3.692h5.17c.53 0 .984.4.984.939v5.215H32V4.631A4.624 4.624 0 0027.354 0zm.954 24.83c0 .532-.4.94-.939.94h-5.215v3.768h5.215c2.577 0 4.631-2.13 4.631-4.707v-5.139h-3.692v5.139zm-23.677.94c-.531 0-.939-.4-.939-.94v-5.138H0v5.139c0 2.577 2.13 4.707 4.708 4.707h5.138V25.77H4.631z"})})}function Are(){return N.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:N.jsx("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0 8 0 4.571 3.429 4.571 7.619v3.048H3.048A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047zm4.724-13.866H7.467V7.619c0-2.59 2.133-4.724 4.723-4.724 2.591 0 4.724 2.133 4.724 4.724v3.048z"})})}function Tre(){return N.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:N.jsx("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0c-4.114 1.828-1.37 2.133.305 2.438 1.676.305 4.42 2.59 4.42 5.181v3.048H3.047A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047z"})})}function Rd({children:e,className:t,...n}){return N.jsx("button",{type:"button",className:en(["react-flow__controls-button",t]),...n,children:e})}const Cre=e=>({isInteractive:e.nodesDraggable||e.nodesConnectable||e.elementsSelectable,minZoomReached:e.transform[2]<=e.minZoom,maxZoomReached:e.transform[2]>=e.maxZoom});function AP({style:e,showZoom:t=!0,showFitView:n=!0,showInteractive:r=!0,fitViewOptions:i,onZoomIn:a,onZoomOut:o,onFitView:l,onInteractiveChange:c,className:f,children:d,position:h="bottom-left",orientation:m="vertical","aria-label":g="React Flow controls"}){const v=Lt(),{isInteractive:w,minZoomReached:b,maxZoomReached:_}=ut(Cre,Ut),{zoomIn:S,zoomOut:x,fitView:A}=Ip(),k=()=>{S(),a==null||a()},T=()=>{x(),o==null||o()},O=()=>{A(i),l==null||l()},$=()=>{v.setState({nodesDraggable:!w,nodesConnectable:!w,elementsSelectable:!w}),c==null||c(!w)},L=m==="horizontal"?"horizontal":"vertical";return N.jsxs(jc,{className:en(["react-flow__controls",L,f]),position:h,style:e,"data-testid":"rf__controls","aria-label":g,children:[t&&N.jsxs(N.Fragment,{children:[N.jsx(Rd,{onClick:k,className:"react-flow__controls-zoomin",title:"zoom in","aria-label":"zoom in",disabled:_,children:N.jsx(Sre,{})}),N.jsx(Rd,{onClick:T,className:"react-flow__controls-zoomout",title:"zoom out","aria-label":"zoom out",disabled:b,children:N.jsx(Ere,{})})]}),n&&N.jsx(Rd,{className:"react-flow__controls-fitview",onClick:O,title:"fit view","aria-label":"fit view",children:N.jsx(kre,{})}),r&&N.jsx(Rd,{className:"react-flow__controls-interactive",onClick:$,title:"toggle interactivity","aria-label":"toggle interactivity",children:w?N.jsx(Tre,{}):N.jsx(Are,{})}),d]})}AP.displayName="Controls";const Ore=te.memo(AP);function Nre({id:e,x:t,y:n,width:r,height:i,style:a,color:o,strokeColor:l,strokeWidth:c,className:f,borderRadius:d,shapeRendering:h,selected:m,onClick:g}){const{background:v,backgroundColor:w}=a||{},b=o||v||w;return N.jsx("rect",{className:en(["react-flow__minimap-node",{selected:m},f]),x:t,y:n,rx:d,ry:d,width:r,height:i,style:{fill:b,stroke:l,strokeWidth:c},shapeRendering:h,onClick:g?_=>g(_,e):void 0})}const Rre=te.memo(Nre),jre=e=>e.nodes.map(t=>t.id),N0=e=>e instanceof Function?e:()=>e;function Mre({nodeStrokeColor:e,nodeColor:t,nodeClassName:n="",nodeBorderRadius:r=5,nodeStrokeWidth:i,nodeComponent:a=Rre,onClick:o}){const l=ut(jre,Ut),c=N0(t),f=N0(e),d=N0(n),h=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision";return N.jsx(N.Fragment,{children:l.map(m=>N.jsx(Dre,{id:m,nodeColorFunc:c,nodeStrokeColorFunc:f,nodeClassNameFunc:d,nodeBorderRadius:r,nodeStrokeWidth:i,NodeComponent:a,onClick:o,shapeRendering:h},m))})}function $re({id:e,nodeColorFunc:t,nodeStrokeColorFunc:n,nodeClassNameFunc:r,nodeBorderRadius:i,nodeStrokeWidth:a,shapeRendering:o,NodeComponent:l,onClick:c}){const{node:f,x:d,y:h,width:m,height:g}=ut(v=>{const{internals:w}=v.nodeLookup.get(e),b=w.userNode,{x:_,y:S}=w.positionAbsolute,{width:x,height:A}=zi(b);return{node:b,x:_,y:S,width:x,height:A}},Ut);return!f||f.hidden||!T9(f)?null:N.jsx(l,{x:d,y:h,width:m,height:g,style:f.style,selected:!!f.selected,className:r(f),color:t(f),borderRadius:i,strokeColor:n(f),strokeWidth:a,shapeRendering:o,onClick:c,id:f.id})}const Dre=te.memo($re);var Ire=te.memo(Mre);const Pre=200,Lre=150,zre=e=>!e.hidden,qre=e=>{const t={x:-e.transform[0]/e.transform[2],y:-e.transform[1]/e.transform[2],width:e.width/e.transform[2],height:e.height/e.transform[2]};return{viewBB:t,boundingRect:e.nodeLookup.size>0?A9(Nc(e.nodeLookup,{filter:zre}),t):t,rfId:e.rfId,panZoom:e.panZoom,translateExtent:e.translateExtent,flowWidth:e.width,flowHeight:e.height}},Fre="react-flow__minimap-desc";function TP({style:e,className:t,nodeStrokeColor:n,nodeColor:r,nodeClassName:i="",nodeBorderRadius:a=5,nodeStrokeWidth:o,nodeComponent:l,bgColor:c,maskColor:f,maskStrokeColor:d,maskStrokeWidth:h,position:m="bottom-right",onClick:g,onNodeClick:v,pannable:w=!1,zoomable:b=!1,ariaLabel:_="React Flow mini map",inversePan:S,zoomStep:x=10,offsetScale:A=5}){const k=Lt(),T=te.useRef(null),{boundingRect:O,viewBB:$,rfId:L,panZoom:M,translateExtent:z,flowWidth:P,flowHeight:q}=ut(qre,Ut),D=(e==null?void 0:e.width)??Pre,H=(e==null?void 0:e.height)??Lre,B=O.width/D,G=O.height/H,K=Math.max(B,G),Q=K*D,R=K*H,V=A*K,X=O.x-(Q-O.width)/2-V,j=O.y-(R-O.height)/2-V,I=Q+V*2,U=R+V*2,Y=`${Fre}-${L}`,ne=te.useRef(0),ae=te.useRef();ne.current=K,te.useEffect(()=>{if(T.current&&M)return ae.current=ite({domNode:T.current,panZoom:M,getTransform:()=>k.getState().transform,getViewScale:()=>ne.current}),()=>{var W;(W=ae.current)==null||W.destroy()}},[M]),te.useEffect(()=>{var W;(W=ae.current)==null||W.update({translateExtent:z,width:P,height:q,inversePan:S,pannable:w,zoomStep:x,zoomable:b})},[w,b,S,x,z,P,q]);const re=g?W=>{var fe;const[J,se]=((fe=ae.current)==null?void 0:fe.pointer(W))||[0,0];g(W,{x:J,y:se})}:void 0,le=v?te.useCallback((W,J)=>{const se=k.getState().nodeLookup.get(J).internals.userNode;v(W,se)},[]):void 0;return N.jsx(jc,{position:m,style:{...e,"--xy-minimap-background-color-props":typeof c=="string"?c:void 0,"--xy-minimap-mask-background-color-props":typeof f=="string"?f:void 0,"--xy-minimap-mask-stroke-color-props":typeof d=="string"?d:void 0,"--xy-minimap-mask-stroke-width-props":typeof h=="number"?h*K:void 0,"--xy-minimap-node-background-color-props":typeof r=="string"?r:void 0,"--xy-minimap-node-stroke-color-props":typeof n=="string"?n:void 0,"--xy-minimap-node-stroke-width-props":typeof o=="number"?o:void 0},className:en(["react-flow__minimap",t]),"data-testid":"rf__minimap",children:N.jsxs("svg",{width:D,height:H,viewBox:`${X} ${j} ${I} ${U}`,className:"react-flow__minimap-svg",role:"img","aria-labelledby":Y,ref:T,onClick:re,children:[_&&N.jsx("title",{id:Y,children:_}),N.jsx(Ire,{onClick:le,nodeColor:r,nodeStrokeColor:n,nodeBorderRadius:a,nodeClassName:i,nodeStrokeWidth:o,nodeComponent:l}),N.jsx("path",{className:"react-flow__minimap-mask",d:`M${X-V},${j-V}h${I+V*2}v${U+V*2}h${-I-V*2}z
|
|
230
|
+
M${$.x},${$.y}h${$.width}v${$.height}h${-$.width}z`,fillRule:"evenodd",pointerEvents:"none"})]})})}TP.displayName="MiniMap";te.memo(TP);function Bre({nodeId:e,position:t,variant:n=Yu.Handle,className:r,style:i={},children:a,color:o,minWidth:l=10,minHeight:c=10,maxWidth:f=Number.MAX_VALUE,maxHeight:d=Number.MAX_VALUE,keepAspectRatio:h=!1,resizeDirection:m,shouldResize:g,onResizeStart:v,onResize:w,onResizeEnd:b}){const _=iP(),S=typeof e=="string"?e:_,x=Lt(),A=te.useRef(null),k=n===Yu.Line?"right":"bottom-right",T=t??k,O=te.useRef(null);te.useEffect(()=>{if(!(!A.current||!S))return O.current||(O.current=vte({domNode:A.current,nodeId:S,getStoreItems:()=>{const{nodeLookup:z,transform:P,snapGrid:q,snapToGrid:D,nodeOrigin:H,domNode:B}=x.getState();return{nodeLookup:z,transform:P,snapGrid:q,snapToGrid:D,nodeOrigin:H,paneDomNode:B}},onChange:(z,P)=>{const{triggerNodeChanges:q,nodeLookup:D,parentLookup:H,nodeOrigin:B}=x.getState(),G=[],K={x:z.x,y:z.y},Q=D.get(S);if(Q&&Q.expandParent&&Q.parentId){const R=Q.origin??B,V=z.width??Q.measured.width??0,X=z.height??Q.measured.height??0,j={id:Q.id,parentId:Q.parentId,rect:{width:V,height:X,...C9({x:z.x??Q.position.x,y:z.y??Q.position.y},{width:V,height:X},Q.parentId,D,R)}},I=$S([j],D,H,B);G.push(...I),K.x=z.x?Math.max(R[0]*V,z.x):void 0,K.y=z.y?Math.max(R[1]*X,z.y):void 0}if(K.x!==void 0&&K.y!==void 0){const R={id:S,type:"position",position:{...K}};G.push(R)}if(z.width!==void 0&&z.height!==void 0){const V={id:S,type:"dimensions",resizing:!0,setAttributes:m?m==="horizontal"?"width":"height":!0,dimensions:{width:z.width,height:z.height}};G.push(V)}for(const R of P){const V={...R,type:"position"};G.push(V)}q(G)},onEnd:({width:z,height:P})=>{const q={id:S,type:"dimensions",resizing:!1,dimensions:{width:z,height:P}};x.getState().triggerNodeChanges([q])}})),O.current.update({controlPosition:T,boundaries:{minWidth:l,minHeight:c,maxWidth:f,maxHeight:d},keepAspectRatio:h,resizeDirection:m,onResizeStart:v,onResize:w,onResizeEnd:b,shouldResize:g}),()=>{var z;(z=O.current)==null||z.destroy()}},[T,l,c,f,d,h,v,w,b,g]);const $=T.split("-"),L=n===Yu.Line?"borderColor":"backgroundColor",M=o?{...i,[L]:o}:i;return N.jsx("div",{className:en(["react-flow__resize-control","nodrag",...$,n,r]),ref:A,style:M,children:a})}te.memo(Bre);var R0,RN;function IS(){if(RN)return R0;RN=1;var e="\0",t="\0",n="";class r{constructor(d){De(this,"_isDirected",!0);De(this,"_isMultigraph",!1);De(this,"_isCompound",!1);De(this,"_label");De(this,"_defaultNodeLabelFn",()=>{});De(this,"_defaultEdgeLabelFn",()=>{});De(this,"_nodes",{});De(this,"_in",{});De(this,"_preds",{});De(this,"_out",{});De(this,"_sucs",{});De(this,"_edgeObjs",{});De(this,"_edgeLabels",{});De(this,"_nodeCount",0);De(this,"_edgeCount",0);De(this,"_parent");De(this,"_children");d&&(this._isDirected=Object.hasOwn(d,"directed")?d.directed:!0,this._isMultigraph=Object.hasOwn(d,"multigraph")?d.multigraph:!1,this._isCompound=Object.hasOwn(d,"compound")?d.compound:!1),this._isCompound&&(this._parent={},this._children={},this._children[t]={})}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(d){return this._label=d,this}graph(){return this._label}setDefaultNodeLabel(d){return this._defaultNodeLabelFn=d,typeof d!="function"&&(this._defaultNodeLabelFn=()=>d),this}nodeCount(){return this._nodeCount}nodes(){return Object.keys(this._nodes)}sources(){var d=this;return this.nodes().filter(h=>Object.keys(d._in[h]).length===0)}sinks(){var d=this;return this.nodes().filter(h=>Object.keys(d._out[h]).length===0)}setNodes(d,h){var m=arguments,g=this;return d.forEach(function(v){m.length>1?g.setNode(v,h):g.setNode(v)}),this}setNode(d,h){return Object.hasOwn(this._nodes,d)?(arguments.length>1&&(this._nodes[d]=h),this):(this._nodes[d]=arguments.length>1?h:this._defaultNodeLabelFn(d),this._isCompound&&(this._parent[d]=t,this._children[d]={},this._children[t][d]=!0),this._in[d]={},this._preds[d]={},this._out[d]={},this._sucs[d]={},++this._nodeCount,this)}node(d){return this._nodes[d]}hasNode(d){return Object.hasOwn(this._nodes,d)}removeNode(d){var h=this;if(Object.hasOwn(this._nodes,d)){var m=g=>h.removeEdge(h._edgeObjs[g]);delete this._nodes[d],this._isCompound&&(this._removeFromParentsChildList(d),delete this._parent[d],this.children(d).forEach(function(g){h.setParent(g)}),delete this._children[d]),Object.keys(this._in[d]).forEach(m),delete this._in[d],delete this._preds[d],Object.keys(this._out[d]).forEach(m),delete this._out[d],delete this._sucs[d],--this._nodeCount}return this}setParent(d,h){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(h===void 0)h=t;else{h+="";for(var m=h;m!==void 0;m=this.parent(m))if(m===d)throw new Error("Setting "+h+" as parent of "+d+" would create a cycle");this.setNode(h)}return this.setNode(d),this._removeFromParentsChildList(d),this._parent[d]=h,this._children[h][d]=!0,this}_removeFromParentsChildList(d){delete this._children[this._parent[d]][d]}parent(d){if(this._isCompound){var h=this._parent[d];if(h!==t)return h}}children(d=t){if(this._isCompound){var h=this._children[d];if(h)return Object.keys(h)}else{if(d===t)return this.nodes();if(this.hasNode(d))return[]}}predecessors(d){var h=this._preds[d];if(h)return Object.keys(h)}successors(d){var h=this._sucs[d];if(h)return Object.keys(h)}neighbors(d){var h=this.predecessors(d);if(h){const g=new Set(h);for(var m of this.successors(d))g.add(m);return Array.from(g.values())}}isLeaf(d){var h;return this.isDirected()?h=this.successors(d):h=this.neighbors(d),h.length===0}filterNodes(d){var h=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});h.setGraph(this.graph());var m=this;Object.entries(this._nodes).forEach(function([w,b]){d(w)&&h.setNode(w,b)}),Object.values(this._edgeObjs).forEach(function(w){h.hasNode(w.v)&&h.hasNode(w.w)&&h.setEdge(w,m.edge(w))});var g={};function v(w){var b=m.parent(w);return b===void 0||h.hasNode(b)?(g[w]=b,b):b in g?g[b]:v(b)}return this._isCompound&&h.nodes().forEach(w=>h.setParent(w,v(w))),h}setDefaultEdgeLabel(d){return this._defaultEdgeLabelFn=d,typeof d!="function"&&(this._defaultEdgeLabelFn=()=>d),this}edgeCount(){return this._edgeCount}edges(){return Object.values(this._edgeObjs)}setPath(d,h){var m=this,g=arguments;return d.reduce(function(v,w){return g.length>1?m.setEdge(v,w,h):m.setEdge(v,w),w}),this}setEdge(){var d,h,m,g,v=!1,w=arguments[0];typeof w=="object"&&w!==null&&"v"in w?(d=w.v,h=w.w,m=w.name,arguments.length===2&&(g=arguments[1],v=!0)):(d=w,h=arguments[1],m=arguments[3],arguments.length>2&&(g=arguments[2],v=!0)),d=""+d,h=""+h,m!==void 0&&(m=""+m);var b=o(this._isDirected,d,h,m);if(Object.hasOwn(this._edgeLabels,b))return v&&(this._edgeLabels[b]=g),this;if(m!==void 0&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(d),this.setNode(h),this._edgeLabels[b]=v?g:this._defaultEdgeLabelFn(d,h,m);var _=l(this._isDirected,d,h,m);return d=_.v,h=_.w,Object.freeze(_),this._edgeObjs[b]=_,i(this._preds[h],d),i(this._sucs[d],h),this._in[h][b]=_,this._out[d][b]=_,this._edgeCount++,this}edge(d,h,m){var g=arguments.length===1?c(this._isDirected,arguments[0]):o(this._isDirected,d,h,m);return this._edgeLabels[g]}edgeAsObj(){const d=this.edge(...arguments);return typeof d!="object"?{label:d}:d}hasEdge(d,h,m){var g=arguments.length===1?c(this._isDirected,arguments[0]):o(this._isDirected,d,h,m);return Object.hasOwn(this._edgeLabels,g)}removeEdge(d,h,m){var g=arguments.length===1?c(this._isDirected,arguments[0]):o(this._isDirected,d,h,m),v=this._edgeObjs[g];return v&&(d=v.v,h=v.w,delete this._edgeLabels[g],delete this._edgeObjs[g],a(this._preds[h],d),a(this._sucs[d],h),delete this._in[h][g],delete this._out[d][g],this._edgeCount--),this}inEdges(d,h){var m=this._in[d];if(m){var g=Object.values(m);return h?g.filter(v=>v.v===h):g}}outEdges(d,h){var m=this._out[d];if(m){var g=Object.values(m);return h?g.filter(v=>v.w===h):g}}nodeEdges(d,h){var m=this.inEdges(d,h);if(m)return m.concat(this.outEdges(d,h))}}function i(f,d){f[d]?f[d]++:f[d]=1}function a(f,d){--f[d]||delete f[d]}function o(f,d,h,m){var g=""+d,v=""+h;if(!f&&g>v){var w=g;g=v,v=w}return g+n+v+n+(m===void 0?e:m)}function l(f,d,h,m){var g=""+d,v=""+h;if(!f&&g>v){var w=g;g=v,v=w}var b={v:g,w:v};return m&&(b.name=m),b}function c(f,d){return o(f,d.v,d.w,d.name)}return R0=r,R0}var j0,jN;function Ure(){return jN||(jN=1,j0="2.2.4"),j0}var M0,MN;function Vre(){return MN||(MN=1,M0={Graph:IS(),version:Ure()}),M0}var $0,$N;function Hre(){if($N)return $0;$N=1;var e=IS();$0={write:t,read:i};function t(a){var o={options:{directed:a.isDirected(),multigraph:a.isMultigraph(),compound:a.isCompound()},nodes:n(a),edges:r(a)};return a.graph()!==void 0&&(o.value=structuredClone(a.graph())),o}function n(a){return a.nodes().map(function(o){var l=a.node(o),c=a.parent(o),f={v:o};return l!==void 0&&(f.value=l),c!==void 0&&(f.parent=c),f})}function r(a){return a.edges().map(function(o){var l=a.edge(o),c={v:o.v,w:o.w};return o.name!==void 0&&(c.name=o.name),l!==void 0&&(c.value=l),c})}function i(a){var o=new e(a.options).setGraph(a.value);return a.nodes.forEach(function(l){o.setNode(l.v,l.value),l.parent&&o.setParent(l.v,l.parent)}),a.edges.forEach(function(l){o.setEdge({v:l.v,w:l.w,name:l.name},l.value)}),o}return $0}var D0,DN;function Gre(){if(DN)return D0;DN=1,D0=e;function e(t){var n={},r=[],i;function a(o){Object.hasOwn(n,o)||(n[o]=!0,i.push(o),t.successors(o).forEach(a),t.predecessors(o).forEach(a))}return t.nodes().forEach(function(o){i=[],a(o),i.length&&r.push(i)}),r}return D0}var I0,IN;function CP(){if(IN)return I0;IN=1;class e{constructor(){De(this,"_arr",[]);De(this,"_keyIndices",{})}size(){return this._arr.length}keys(){return this._arr.map(function(n){return n.key})}has(n){return Object.hasOwn(this._keyIndices,n)}priority(n){var r=this._keyIndices[n];if(r!==void 0)return this._arr[r].priority}min(){if(this.size()===0)throw new Error("Queue underflow");return this._arr[0].key}add(n,r){var i=this._keyIndices;if(n=String(n),!Object.hasOwn(i,n)){var a=this._arr,o=a.length;return i[n]=o,a.push({key:n,priority:r}),this._decrease(o),!0}return!1}removeMin(){this._swap(0,this._arr.length-1);var n=this._arr.pop();return delete this._keyIndices[n.key],this._heapify(0),n.key}decrease(n,r){var i=this._keyIndices[n];if(r>this._arr[i].priority)throw new Error("New priority is greater than current priority. Key: "+n+" Old: "+this._arr[i].priority+" New: "+r);this._arr[i].priority=r,this._decrease(i)}_heapify(n){var r=this._arr,i=2*n,a=i+1,o=n;i<r.length&&(o=r[i].priority<r[o].priority?i:o,a<r.length&&(o=r[a].priority<r[o].priority?a:o),o!==n&&(this._swap(n,o),this._heapify(o)))}_decrease(n){for(var r=this._arr,i=r[n].priority,a;n!==0&&(a=n>>1,!(r[a].priority<i));)this._swap(n,a),n=a}_swap(n,r){var i=this._arr,a=this._keyIndices,o=i[n],l=i[r];i[n]=l,i[r]=o,a[l.key]=n,a[o.key]=r}}return I0=e,I0}var P0,PN;function OP(){if(PN)return P0;PN=1;var e=CP();P0=n;var t=()=>1;function n(i,a,o,l){return r(i,String(a),o||t,l||function(c){return i.outEdges(c)})}function r(i,a,o,l){var c={},f=new e,d,h,m=function(g){var v=g.v!==d?g.v:g.w,w=c[v],b=o(g),_=h.distance+b;if(b<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+g+" Weight: "+b);_<w.distance&&(w.distance=_,w.predecessor=d,f.decrease(v,_))};for(i.nodes().forEach(function(g){var v=g===a?0:Number.POSITIVE_INFINITY;c[g]={distance:v},f.add(g,v)});f.size()>0&&(d=f.removeMin(),h=c[d],h.distance!==Number.POSITIVE_INFINITY);)l(d).forEach(m);return c}return P0}var L0,LN;function Yre(){if(LN)return L0;LN=1;var e=OP();L0=t;function t(n,r,i){return n.nodes().reduce(function(a,o){return a[o]=e(n,o,r,i),a},{})}return L0}var z0,zN;function NP(){if(zN)return z0;zN=1,z0=e;function e(t){var n=0,r=[],i={},a=[];function o(l){var c=i[l]={onStack:!0,lowlink:n,index:n++};if(r.push(l),t.successors(l).forEach(function(h){Object.hasOwn(i,h)?i[h].onStack&&(c.lowlink=Math.min(c.lowlink,i[h].index)):(o(h),c.lowlink=Math.min(c.lowlink,i[h].lowlink))}),c.lowlink===c.index){var f=[],d;do d=r.pop(),i[d].onStack=!1,f.push(d);while(l!==d);a.push(f)}}return t.nodes().forEach(function(l){Object.hasOwn(i,l)||o(l)}),a}return z0}var q0,qN;function Zre(){if(qN)return q0;qN=1;var e=NP();q0=t;function t(n){return e(n).filter(function(r){return r.length>1||r.length===1&&n.hasEdge(r[0],r[0])})}return q0}var F0,FN;function Kre(){if(FN)return F0;FN=1,F0=t;var e=()=>1;function t(r,i,a){return n(r,i||e,a||function(o){return r.outEdges(o)})}function n(r,i,a){var o={},l=r.nodes();return l.forEach(function(c){o[c]={},o[c][c]={distance:0},l.forEach(function(f){c!==f&&(o[c][f]={distance:Number.POSITIVE_INFINITY})}),a(c).forEach(function(f){var d=f.v===c?f.w:f.v,h=i(f);o[c][d]={distance:h,predecessor:c}})}),l.forEach(function(c){var f=o[c];l.forEach(function(d){var h=o[d];l.forEach(function(m){var g=h[c],v=f[m],w=h[m],b=g.distance+v.distance;b<w.distance&&(w.distance=b,w.predecessor=v.predecessor)})})}),o}return F0}var B0,BN;function RP(){if(BN)return B0;BN=1;function e(n){var r={},i={},a=[];function o(l){if(Object.hasOwn(i,l))throw new t;Object.hasOwn(r,l)||(i[l]=!0,r[l]=!0,n.predecessors(l).forEach(o),delete i[l],a.push(l))}if(n.sinks().forEach(o),Object.keys(r).length!==n.nodeCount())throw new t;return a}class t extends Error{constructor(){super(...arguments)}}return B0=e,e.CycleException=t,B0}var U0,UN;function Xre(){if(UN)return U0;UN=1;var e=RP();U0=t;function t(n){try{e(n)}catch(r){if(r instanceof e.CycleException)return!1;throw r}return!0}return U0}var V0,VN;function jP(){if(VN)return V0;VN=1,V0=e;function e(i,a,o){Array.isArray(a)||(a=[a]);var l=i.isDirected()?h=>i.successors(h):h=>i.neighbors(h),c=o==="post"?t:n,f=[],d={};return a.forEach(h=>{if(!i.hasNode(h))throw new Error("Graph does not have node: "+h);c(h,l,d,f)}),f}function t(i,a,o,l){for(var c=[[i,!1]];c.length>0;){var f=c.pop();f[1]?l.push(f[0]):Object.hasOwn(o,f[0])||(o[f[0]]=!0,c.push([f[0],!0]),r(a(f[0]),d=>c.push([d,!1])))}}function n(i,a,o,l){for(var c=[i];c.length>0;){var f=c.pop();Object.hasOwn(o,f)||(o[f]=!0,l.push(f),r(a(f),d=>c.push(d)))}}function r(i,a){for(var o=i.length;o--;)a(i[o],o,i);return i}return V0}var H0,HN;function Wre(){if(HN)return H0;HN=1;var e=jP();H0=t;function t(n,r){return e(n,r,"post")}return H0}var G0,GN;function Qre(){if(GN)return G0;GN=1;var e=jP();G0=t;function t(n,r){return e(n,r,"pre")}return G0}var Y0,YN;function Jre(){if(YN)return Y0;YN=1;var e=IS(),t=CP();Y0=n;function n(r,i){var a=new e,o={},l=new t,c;function f(h){var m=h.v===c?h.w:h.v,g=l.priority(m);if(g!==void 0){var v=i(h);v<g&&(o[m]=c,l.decrease(m,v))}}if(r.nodeCount()===0)return a;r.nodes().forEach(function(h){l.add(h,Number.POSITIVE_INFINITY),a.setNode(h)}),l.decrease(r.nodes()[0],0);for(var d=!1;l.size()>0;){if(c=l.removeMin(),Object.hasOwn(o,c))a.setEdge(c,o[c]);else{if(d)throw new Error("Input graph is not connected: "+r);d=!0}r.nodeEdges(c).forEach(f)}return a}return Y0}var Z0,ZN;function eie(){return ZN||(ZN=1,Z0={components:Gre(),dijkstra:OP(),dijkstraAll:Yre(),findCycles:Zre(),floydWarshall:Kre(),isAcyclic:Xre(),postorder:Wre(),preorder:Qre(),prim:Jre(),tarjan:NP(),topsort:RP()}),Z0}var K0,KN;function Ir(){if(KN)return K0;KN=1;var e=Vre();return K0={Graph:e.Graph,json:Hre(),alg:eie(),version:e.version},K0}var X0,XN;function tie(){if(XN)return X0;XN=1;class e{constructor(){let i={};i._next=i._prev=i,this._sentinel=i}dequeue(){let i=this._sentinel,a=i._prev;if(a!==i)return t(a),a}enqueue(i){let a=this._sentinel;i._prev&&i._next&&t(i),i._next=a._next,a._next._prev=i,a._next=i,i._prev=a}toString(){let i=[],a=this._sentinel,o=a._prev;for(;o!==a;)i.push(JSON.stringify(o,n)),o=o._prev;return"["+i.join(", ")+"]"}}function t(r){r._prev._next=r._next,r._next._prev=r._prev,delete r._next,delete r._prev}function n(r,i){if(r!=="_next"&&r!=="_prev")return i}return X0=e,X0}var W0,WN;function nie(){if(WN)return W0;WN=1;let e=Ir().Graph,t=tie();W0=r;let n=()=>1;function r(f,d){if(f.nodeCount()<=1)return[];let h=o(f,d||n);return i(h.graph,h.buckets,h.zeroIdx).flatMap(g=>f.outEdges(g.v,g.w))}function i(f,d,h){let m=[],g=d[d.length-1],v=d[0],w;for(;f.nodeCount();){for(;w=v.dequeue();)a(f,d,h,w);for(;w=g.dequeue();)a(f,d,h,w);if(f.nodeCount()){for(let b=d.length-2;b>0;--b)if(w=d[b].dequeue(),w){m=m.concat(a(f,d,h,w,!0));break}}}return m}function a(f,d,h,m,g){let v=g?[]:void 0;return f.inEdges(m.v).forEach(w=>{let b=f.edge(w),_=f.node(w.v);g&&v.push({v:w.v,w:w.w}),_.out-=b,l(d,h,_)}),f.outEdges(m.v).forEach(w=>{let b=f.edge(w),_=w.w,S=f.node(_);S.in-=b,l(d,h,S)}),f.removeNode(m.v),v}function o(f,d){let h=new e,m=0,g=0;f.nodes().forEach(b=>{h.setNode(b,{v:b,in:0,out:0})}),f.edges().forEach(b=>{let _=h.edge(b.v,b.w)||0,S=d(b),x=_+S;h.setEdge(b.v,b.w,x),g=Math.max(g,h.node(b.v).out+=S),m=Math.max(m,h.node(b.w).in+=S)});let v=c(g+m+3).map(()=>new t),w=m+1;return h.nodes().forEach(b=>{l(v,w,h.node(b))}),{graph:h,buckets:v,zeroIdx:w}}function l(f,d,h){h.out?h.in?f[h.out-h.in+d].enqueue(h):f[f.length-1].enqueue(h):f[0].enqueue(h)}function c(f){const d=[];for(let h=0;h<f;h++)d.push(h);return d}return W0}var Q0,QN;function Jt(){if(QN)return Q0;QN=1;let e=Ir().Graph;Q0={addBorderNode:d,addDummyNode:t,applyWithChunking:g,asNonCompoundGraph:r,buildLayerMatrix:l,intersectRect:o,mapValues:T,maxRank:v,normalizeRanks:c,notime:_,partition:w,pick:k,predecessorWeights:a,range:A,removeEmptyRanks:f,simplify:n,successorWeights:i,time:b,uniqueId:x,zipObject:O};function t($,L,M,z){let P;do P=x(z);while($.hasNode(P));return M.dummy=L,$.setNode(P,M),P}function n($){let L=new e().setGraph($.graph());return $.nodes().forEach(M=>L.setNode(M,$.node(M))),$.edges().forEach(M=>{let z=L.edge(M.v,M.w)||{weight:0,minlen:1},P=$.edge(M);L.setEdge(M.v,M.w,{weight:z.weight+P.weight,minlen:Math.max(z.minlen,P.minlen)})}),L}function r($){let L=new e({multigraph:$.isMultigraph()}).setGraph($.graph());return $.nodes().forEach(M=>{$.children(M).length||L.setNode(M,$.node(M))}),$.edges().forEach(M=>{L.setEdge(M,$.edge(M))}),L}function i($){let L=$.nodes().map(M=>{let z={};return $.outEdges(M).forEach(P=>{z[P.w]=(z[P.w]||0)+$.edge(P).weight}),z});return O($.nodes(),L)}function a($){let L=$.nodes().map(M=>{let z={};return $.inEdges(M).forEach(P=>{z[P.v]=(z[P.v]||0)+$.edge(P).weight}),z});return O($.nodes(),L)}function o($,L){let M=$.x,z=$.y,P=L.x-M,q=L.y-z,D=$.width/2,H=$.height/2;if(!P&&!q)throw new Error("Not possible to find intersection inside of the rectangle");let B,G;return Math.abs(q)*D>Math.abs(P)*H?(q<0&&(H=-H),B=H*P/q,G=H):(P<0&&(D=-D),B=D,G=D*q/P),{x:M+B,y:z+G}}function l($){let L=A(v($)+1).map(()=>[]);return $.nodes().forEach(M=>{let z=$.node(M),P=z.rank;P!==void 0&&(L[P][z.order]=M)}),L}function c($){let L=$.nodes().map(z=>{let P=$.node(z).rank;return P===void 0?Number.MAX_VALUE:P}),M=g(Math.min,L);$.nodes().forEach(z=>{let P=$.node(z);Object.hasOwn(P,"rank")&&(P.rank-=M)})}function f($){let L=$.nodes().map(D=>$.node(D).rank),M=g(Math.min,L),z=[];$.nodes().forEach(D=>{let H=$.node(D).rank-M;z[H]||(z[H]=[]),z[H].push(D)});let P=0,q=$.graph().nodeRankFactor;Array.from(z).forEach((D,H)=>{D===void 0&&H%q!==0?--P:D!==void 0&&P&&D.forEach(B=>$.node(B).rank+=P)})}function d($,L,M,z){let P={width:0,height:0};return arguments.length>=4&&(P.rank=M,P.order=z),t($,"border",P,L)}function h($,L=m){const M=[];for(let z=0;z<$.length;z+=L){const P=$.slice(z,z+L);M.push(P)}return M}const m=65535;function g($,L){if(L.length>m){const M=h(L);return $.apply(null,M.map(z=>$.apply(null,z)))}else return $.apply(null,L)}function v($){const M=$.nodes().map(z=>{let P=$.node(z).rank;return P===void 0?Number.MIN_VALUE:P});return g(Math.max,M)}function w($,L){let M={lhs:[],rhs:[]};return $.forEach(z=>{L(z)?M.lhs.push(z):M.rhs.push(z)}),M}function b($,L){let M=Date.now();try{return L()}finally{console.log($+" time: "+(Date.now()-M)+"ms")}}function _($,L){return L()}let S=0;function x($){var L=++S;return toString($)+L}function A($,L,M=1){L==null&&(L=$,$=0);let z=q=>q<L;M<0&&(z=q=>L<q);const P=[];for(let q=$;z(q);q+=M)P.push(q);return P}function k($,L){const M={};for(const z of L)$[z]!==void 0&&(M[z]=$[z]);return M}function T($,L){let M=L;return typeof L=="string"&&(M=z=>z[L]),Object.entries($).reduce((z,[P,q])=>(z[P]=M(q,P),z),{})}function O($,L){return $.reduce((M,z,P)=>(M[z]=L[P],M),{})}return Q0}var J0,JN;function rie(){if(JN)return J0;JN=1;let e=nie(),t=Jt().uniqueId;J0={run:n,undo:i};function n(a){(a.graph().acyclicer==="greedy"?e(a,l(a)):r(a)).forEach(c=>{let f=a.edge(c);a.removeEdge(c),f.forwardName=c.name,f.reversed=!0,a.setEdge(c.w,c.v,f,t("rev"))});function l(c){return f=>c.edge(f).weight}}function r(a){let o=[],l={},c={};function f(d){Object.hasOwn(c,d)||(c[d]=!0,l[d]=!0,a.outEdges(d).forEach(h=>{Object.hasOwn(l,h.w)?o.push(h):f(h.w)}),delete l[d])}return a.nodes().forEach(f),o}function i(a){a.edges().forEach(o=>{let l=a.edge(o);if(l.reversed){a.removeEdge(o);let c=l.forwardName;delete l.reversed,delete l.forwardName,a.setEdge(o.w,o.v,l,c)}})}return J0}var eb,eR;function iie(){if(eR)return eb;eR=1;let e=Jt();eb={run:t,undo:r};function t(i){i.graph().dummyChains=[],i.edges().forEach(a=>n(i,a))}function n(i,a){let o=a.v,l=i.node(o).rank,c=a.w,f=i.node(c).rank,d=a.name,h=i.edge(a),m=h.labelRank;if(f===l+1)return;i.removeEdge(a);let g,v,w;for(w=0,++l;l<f;++w,++l)h.points=[],v={width:0,height:0,edgeLabel:h,edgeObj:a,rank:l},g=e.addDummyNode(i,"edge",v,"_d"),l===m&&(v.width=h.width,v.height=h.height,v.dummy="edge-label",v.labelpos=h.labelpos),i.setEdge(o,g,{weight:h.weight},d),w===0&&i.graph().dummyChains.push(g),o=g;i.setEdge(o,c,{weight:h.weight},d)}function r(i){i.graph().dummyChains.forEach(a=>{let o=i.node(a),l=o.edgeLabel,c;for(i.setEdge(o.edgeObj,l);o.dummy;)c=i.successors(a)[0],i.removeNode(a),l.points.push({x:o.x,y:o.y}),o.dummy==="edge-label"&&(l.x=o.x,l.y=o.y,l.width=o.width,l.height=o.height),a=c,o=i.node(a)})}return eb}var tb,tR;function sp(){if(tR)return tb;tR=1;const{applyWithChunking:e}=Jt();tb={longestPath:t,slack:n};function t(r){var i={};function a(o){var l=r.node(o);if(Object.hasOwn(i,o))return l.rank;i[o]=!0;let c=r.outEdges(o).map(d=>d==null?Number.POSITIVE_INFINITY:a(d.w)-r.edge(d).minlen);var f=e(Math.min,c);return f===Number.POSITIVE_INFINITY&&(f=0),l.rank=f}r.sources().forEach(a)}function n(r,i){return r.node(i.w).rank-r.node(i.v).rank-r.edge(i).minlen}return tb}var nb,nR;function MP(){if(nR)return nb;nR=1;var e=Ir().Graph,t=sp().slack;nb=n;function n(o){var l=new e({directed:!1}),c=o.nodes()[0],f=o.nodeCount();l.setNode(c,{});for(var d,h;r(l,o)<f;)d=i(l,o),h=l.hasNode(d.v)?t(o,d):-t(o,d),a(l,o,h);return l}function r(o,l){function c(f){l.nodeEdges(f).forEach(d=>{var h=d.v,m=f===h?d.w:h;!o.hasNode(m)&&!t(l,d)&&(o.setNode(m,{}),o.setEdge(f,m,{}),c(m))})}return o.nodes().forEach(c),o.nodeCount()}function i(o,l){return l.edges().reduce((f,d)=>{let h=Number.POSITIVE_INFINITY;return o.hasNode(d.v)!==o.hasNode(d.w)&&(h=t(l,d)),h<f[0]?[h,d]:f},[Number.POSITIVE_INFINITY,null])[1]}function a(o,l,c){o.nodes().forEach(f=>l.node(f).rank+=c)}return nb}var rb,rR;function aie(){if(rR)return rb;rR=1;var e=MP(),t=sp().slack,n=sp().longestPath,r=Ir().alg.preorder,i=Ir().alg.postorder,a=Jt().simplify;rb=o,o.initLowLimValues=d,o.initCutValues=l,o.calcCutValue=f,o.leaveEdge=m,o.enterEdge=g,o.exchangeEdges=v;function o(S){S=a(S),n(S);var x=e(S);d(x),l(x,S);for(var A,k;A=m(x);)k=g(x,S,A),v(x,S,A,k)}function l(S,x){var A=i(S,S.nodes());A=A.slice(0,A.length-1),A.forEach(k=>c(S,x,k))}function c(S,x,A){var k=S.node(A),T=k.parent;S.edge(A,T).cutvalue=f(S,x,A)}function f(S,x,A){var k=S.node(A),T=k.parent,O=!0,$=x.edge(A,T),L=0;return $||(O=!1,$=x.edge(T,A)),L=$.weight,x.nodeEdges(A).forEach(M=>{var z=M.v===A,P=z?M.w:M.v;if(P!==T){var q=z===O,D=x.edge(M).weight;if(L+=q?D:-D,b(S,A,P)){var H=S.edge(A,P).cutvalue;L+=q?-H:H}}}),L}function d(S,x){arguments.length<2&&(x=S.nodes()[0]),h(S,{},1,x)}function h(S,x,A,k,T){var O=A,$=S.node(k);return x[k]=!0,S.neighbors(k).forEach(L=>{Object.hasOwn(x,L)||(A=h(S,x,A,L,k))}),$.low=O,$.lim=A++,T?$.parent=T:delete $.parent,A}function m(S){return S.edges().find(x=>S.edge(x).cutvalue<0)}function g(S,x,A){var k=A.v,T=A.w;x.hasEdge(k,T)||(k=A.w,T=A.v);var O=S.node(k),$=S.node(T),L=O,M=!1;O.lim>$.lim&&(L=$,M=!0);var z=x.edges().filter(P=>M===_(S,S.node(P.v),L)&&M!==_(S,S.node(P.w),L));return z.reduce((P,q)=>t(x,q)<t(x,P)?q:P)}function v(S,x,A,k){var T=A.v,O=A.w;S.removeEdge(T,O),S.setEdge(k.v,k.w,{}),d(S),l(S,x),w(S,x)}function w(S,x){var A=S.nodes().find(T=>!x.node(T).parent),k=r(S,A);k=k.slice(1),k.forEach(T=>{var O=S.node(T).parent,$=x.edge(T,O),L=!1;$||($=x.edge(O,T),L=!0),x.node(T).rank=x.node(O).rank+(L?$.minlen:-$.minlen)})}function b(S,x,A){return S.hasEdge(x,A)}function _(S,x,A){return A.low<=x.lim&&x.lim<=A.lim}return rb}var ib,iR;function sie(){if(iR)return ib;iR=1;var e=sp(),t=e.longestPath,n=MP(),r=aie();ib=i;function i(c){switch(c.graph().ranker){case"network-simplex":l(c);break;case"tight-tree":o(c);break;case"longest-path":a(c);break;default:l(c)}}var a=t;function o(c){t(c),n(c)}function l(c){r(c)}return ib}var ab,aR;function oie(){if(aR)return ab;aR=1,ab=e;function e(r){let i=n(r);r.graph().dummyChains.forEach(a=>{let o=r.node(a),l=o.edgeObj,c=t(r,i,l.v,l.w),f=c.path,d=c.lca,h=0,m=f[h],g=!0;for(;a!==l.w;){if(o=r.node(a),g){for(;(m=f[h])!==d&&r.node(m).maxRank<o.rank;)h++;m===d&&(g=!1)}if(!g){for(;h<f.length-1&&r.node(m=f[h+1]).minRank<=o.rank;)h++;m=f[h]}r.setParent(a,m),a=r.successors(a)[0]}})}function t(r,i,a,o){let l=[],c=[],f=Math.min(i[a].low,i[o].low),d=Math.max(i[a].lim,i[o].lim),h,m;h=a;do h=r.parent(h),l.push(h);while(h&&(i[h].low>f||d>i[h].lim));for(m=h,h=o;(h=r.parent(h))!==m;)c.push(h);return{path:l.concat(c.reverse()),lca:m}}function n(r){let i={},a=0;function o(l){let c=a;r.children(l).forEach(o),i[l]={low:c,lim:a++}}return r.children().forEach(o),i}return ab}var sb,sR;function lie(){if(sR)return sb;sR=1;let e=Jt();sb={run:t,cleanup:a};function t(o){let l=e.addDummyNode(o,"root",{},"_root"),c=r(o),f=Object.values(c),d=e.applyWithChunking(Math.max,f)-1,h=2*d+1;o.graph().nestingRoot=l,o.edges().forEach(g=>o.edge(g).minlen*=h);let m=i(o)+1;o.children().forEach(g=>n(o,l,h,m,d,c,g)),o.graph().nodeRankFactor=h}function n(o,l,c,f,d,h,m){let g=o.children(m);if(!g.length){m!==l&&o.setEdge(l,m,{weight:0,minlen:c});return}let v=e.addBorderNode(o,"_bt"),w=e.addBorderNode(o,"_bb"),b=o.node(m);o.setParent(v,m),b.borderTop=v,o.setParent(w,m),b.borderBottom=w,g.forEach(_=>{n(o,l,c,f,d,h,_);let S=o.node(_),x=S.borderTop?S.borderTop:_,A=S.borderBottom?S.borderBottom:_,k=S.borderTop?f:2*f,T=x!==A?1:d-h[m]+1;o.setEdge(v,x,{weight:k,minlen:T,nestingEdge:!0}),o.setEdge(A,w,{weight:k,minlen:T,nestingEdge:!0})}),o.parent(m)||o.setEdge(l,v,{weight:0,minlen:d+h[m]})}function r(o){var l={};function c(f,d){var h=o.children(f);h&&h.length&&h.forEach(m=>c(m,d+1)),l[f]=d}return o.children().forEach(f=>c(f,1)),l}function i(o){return o.edges().reduce((l,c)=>l+o.edge(c).weight,0)}function a(o){var l=o.graph();o.removeNode(l.nestingRoot),delete l.nestingRoot,o.edges().forEach(c=>{var f=o.edge(c);f.nestingEdge&&o.removeEdge(c)})}return sb}var ob,oR;function uie(){if(oR)return ob;oR=1;let e=Jt();ob=t;function t(r){function i(a){let o=r.children(a),l=r.node(a);if(o.length&&o.forEach(i),Object.hasOwn(l,"minRank")){l.borderLeft=[],l.borderRight=[];for(let c=l.minRank,f=l.maxRank+1;c<f;++c)n(r,"borderLeft","_bl",a,l,c),n(r,"borderRight","_br",a,l,c)}}r.children().forEach(i)}function n(r,i,a,o,l,c){let f={width:0,height:0,rank:c,borderType:i},d=l[i][c-1],h=e.addDummyNode(r,"border",f,a);l[i][c]=h,r.setParent(h,o),d&&r.setEdge(d,h,{weight:1})}return ob}var lb,lR;function cie(){if(lR)return lb;lR=1,lb={adjust:e,undo:t};function e(c){let f=c.graph().rankdir.toLowerCase();(f==="lr"||f==="rl")&&n(c)}function t(c){let f=c.graph().rankdir.toLowerCase();(f==="bt"||f==="rl")&&i(c),(f==="lr"||f==="rl")&&(o(c),n(c))}function n(c){c.nodes().forEach(f=>r(c.node(f))),c.edges().forEach(f=>r(c.edge(f)))}function r(c){let f=c.width;c.width=c.height,c.height=f}function i(c){c.nodes().forEach(f=>a(c.node(f))),c.edges().forEach(f=>{let d=c.edge(f);d.points.forEach(a),Object.hasOwn(d,"y")&&a(d)})}function a(c){c.y=-c.y}function o(c){c.nodes().forEach(f=>l(c.node(f))),c.edges().forEach(f=>{let d=c.edge(f);d.points.forEach(l),Object.hasOwn(d,"x")&&l(d)})}function l(c){let f=c.x;c.x=c.y,c.y=f}return lb}var ub,uR;function fie(){if(uR)return ub;uR=1;let e=Jt();ub=t;function t(n){let r={},i=n.nodes().filter(d=>!n.children(d).length),a=i.map(d=>n.node(d).rank),o=e.applyWithChunking(Math.max,a),l=e.range(o+1).map(()=>[]);function c(d){if(r[d])return;r[d]=!0;let h=n.node(d);l[h.rank].push(d),n.successors(d).forEach(c)}return i.sort((d,h)=>n.node(d).rank-n.node(h).rank).forEach(c),l}return ub}var cb,cR;function die(){if(cR)return cb;cR=1;let e=Jt().zipObject;cb=t;function t(r,i){let a=0;for(let o=1;o<i.length;++o)a+=n(r,i[o-1],i[o]);return a}function n(r,i,a){let o=e(a,a.map((m,g)=>g)),l=i.flatMap(m=>r.outEdges(m).map(g=>({pos:o[g.w],weight:r.edge(g).weight})).sort((g,v)=>g.pos-v.pos)),c=1;for(;c<a.length;)c<<=1;let f=2*c-1;c-=1;let d=new Array(f).fill(0),h=0;return l.forEach(m=>{let g=m.pos+c;d[g]+=m.weight;let v=0;for(;g>0;)g%2&&(v+=d[g+1]),g=g-1>>1,d[g]+=m.weight;h+=m.weight*v}),h}return cb}var fb,fR;function hie(){if(fR)return fb;fR=1,fb=e;function e(t,n=[]){return n.map(r=>{let i=t.inEdges(r);if(i.length){let a=i.reduce((o,l)=>{let c=t.edge(l),f=t.node(l.v);return{sum:o.sum+c.weight*f.order,weight:o.weight+c.weight}},{sum:0,weight:0});return{v:r,barycenter:a.sum/a.weight,weight:a.weight}}else return{v:r}})}return fb}var db,dR;function pie(){if(dR)return db;dR=1;let e=Jt();db=t;function t(i,a){let o={};i.forEach((c,f)=>{let d=o[c.v]={indegree:0,in:[],out:[],vs:[c.v],i:f};c.barycenter!==void 0&&(d.barycenter=c.barycenter,d.weight=c.weight)}),a.edges().forEach(c=>{let f=o[c.v],d=o[c.w];f!==void 0&&d!==void 0&&(d.indegree++,f.out.push(o[c.w]))});let l=Object.values(o).filter(c=>!c.indegree);return n(l)}function n(i){let a=[];function o(c){return f=>{f.merged||(f.barycenter===void 0||c.barycenter===void 0||f.barycenter>=c.barycenter)&&r(c,f)}}function l(c){return f=>{f.in.push(c),--f.indegree===0&&i.push(f)}}for(;i.length;){let c=i.pop();a.push(c),c.in.reverse().forEach(o(c)),c.out.forEach(l(c))}return a.filter(c=>!c.merged).map(c=>e.pick(c,["vs","i","barycenter","weight"]))}function r(i,a){let o=0,l=0;i.weight&&(o+=i.barycenter*i.weight,l+=i.weight),a.weight&&(o+=a.barycenter*a.weight,l+=a.weight),i.vs=a.vs.concat(i.vs),i.barycenter=o/l,i.weight=l,i.i=Math.min(a.i,i.i),a.merged=!0}return db}var hb,hR;function mie(){if(hR)return hb;hR=1;let e=Jt();hb=t;function t(i,a){let o=e.partition(i,v=>Object.hasOwn(v,"barycenter")),l=o.lhs,c=o.rhs.sort((v,w)=>w.i-v.i),f=[],d=0,h=0,m=0;l.sort(r(!!a)),m=n(f,c,m),l.forEach(v=>{m+=v.vs.length,f.push(v.vs),d+=v.barycenter*v.weight,h+=v.weight,m=n(f,c,m)});let g={vs:f.flat(!0)};return h&&(g.barycenter=d/h,g.weight=h),g}function n(i,a,o){let l;for(;a.length&&(l=a[a.length-1]).i<=o;)a.pop(),i.push(l.vs),o++;return o}function r(i){return(a,o)=>a.barycenter<o.barycenter?-1:a.barycenter>o.barycenter?1:i?o.i-a.i:a.i-o.i}return hb}var pb,pR;function gie(){if(pR)return pb;pR=1;let e=hie(),t=pie(),n=mie();pb=r;function r(o,l,c,f){let d=o.children(l),h=o.node(l),m=h?h.borderLeft:void 0,g=h?h.borderRight:void 0,v={};m&&(d=d.filter(S=>S!==m&&S!==g));let w=e(o,d);w.forEach(S=>{if(o.children(S.v).length){let x=r(o,S.v,c,f);v[S.v]=x,Object.hasOwn(x,"barycenter")&&a(S,x)}});let b=t(w,c);i(b,v);let _=n(b,f);if(m&&(_.vs=[m,_.vs,g].flat(!0),o.predecessors(m).length)){let S=o.node(o.predecessors(m)[0]),x=o.node(o.predecessors(g)[0]);Object.hasOwn(_,"barycenter")||(_.barycenter=0,_.weight=0),_.barycenter=(_.barycenter*_.weight+S.order+x.order)/(_.weight+2),_.weight+=2}return _}function i(o,l){o.forEach(c=>{c.vs=c.vs.flatMap(f=>l[f]?l[f].vs:f)})}function a(o,l){o.barycenter!==void 0?(o.barycenter=(o.barycenter*o.weight+l.barycenter*l.weight)/(o.weight+l.weight),o.weight+=l.weight):(o.barycenter=l.barycenter,o.weight=l.weight)}return pb}var mb,mR;function yie(){if(mR)return mb;mR=1;let e=Ir().Graph,t=Jt();mb=n;function n(i,a,o){let l=r(i),c=new e({compound:!0}).setGraph({root:l}).setDefaultNodeLabel(f=>i.node(f));return i.nodes().forEach(f=>{let d=i.node(f),h=i.parent(f);(d.rank===a||d.minRank<=a&&a<=d.maxRank)&&(c.setNode(f),c.setParent(f,h||l),i[o](f).forEach(m=>{let g=m.v===f?m.w:m.v,v=c.edge(g,f),w=v!==void 0?v.weight:0;c.setEdge(g,f,{weight:i.edge(m).weight+w})}),Object.hasOwn(d,"minRank")&&c.setNode(f,{borderLeft:d.borderLeft[a],borderRight:d.borderRight[a]}))}),c}function r(i){for(var a;i.hasNode(a=t.uniqueId("_root")););return a}return mb}var gb,gR;function bie(){if(gR)return gb;gR=1,gb=e;function e(t,n,r){let i={},a;r.forEach(o=>{let l=t.parent(o),c,f;for(;l;){if(c=t.parent(l),c?(f=i[c],i[c]=l):(f=a,a=l),f&&f!==l){n.setEdge(f,l);return}l=c}})}return gb}var yb,yR;function vie(){if(yR)return yb;yR=1;let e=fie(),t=die(),n=gie(),r=yie(),i=bie(),a=Ir().Graph,o=Jt();yb=l;function l(h,m){if(m&&typeof m.customOrder=="function"){m.customOrder(h,l);return}let g=o.maxRank(h),v=c(h,o.range(1,g+1),"inEdges"),w=c(h,o.range(g-1,-1,-1),"outEdges"),b=e(h);if(d(h,b),m&&m.disableOptimalOrderHeuristic)return;let _=Number.POSITIVE_INFINITY,S;for(let x=0,A=0;A<4;++x,++A){f(x%2?v:w,x%4>=2),b=o.buildLayerMatrix(h);let k=t(h,b);k<_&&(A=0,S=Object.assign({},b),_=k)}d(h,S)}function c(h,m,g){return m.map(function(v){return r(h,v,g)})}function f(h,m){let g=new a;h.forEach(function(v){let w=v.graph().root,b=n(v,w,g,m);b.vs.forEach((_,S)=>v.node(_).order=S),i(v,g,b.vs)})}function d(h,m){Object.values(m).forEach(g=>g.forEach((v,w)=>h.node(v).order=w))}return yb}var bb,bR;function _ie(){if(bR)return bb;bR=1;let e=Ir().Graph,t=Jt();bb={positionX:g,findType1Conflicts:n,findType2Conflicts:r,addConflict:a,hasConflict:o,verticalAlignment:l,horizontalCompaction:c,alignCoordinates:h,findSmallestWidthAlignment:d,balance:m};function n(b,_){let S={};function x(A,k){let T=0,O=0,$=A.length,L=k[k.length-1];return k.forEach((M,z)=>{let P=i(b,M),q=P?b.node(P).order:$;(P||M===L)&&(k.slice(O,z+1).forEach(D=>{b.predecessors(D).forEach(H=>{let B=b.node(H),G=B.order;(G<T||q<G)&&!(B.dummy&&b.node(D).dummy)&&a(S,H,D)})}),O=z+1,T=q)}),k}return _.length&&_.reduce(x),S}function r(b,_){let S={};function x(k,T,O,$,L){let M;t.range(T,O).forEach(z=>{M=k[z],b.node(M).dummy&&b.predecessors(M).forEach(P=>{let q=b.node(P);q.dummy&&(q.order<$||q.order>L)&&a(S,P,M)})})}function A(k,T){let O=-1,$,L=0;return T.forEach((M,z)=>{if(b.node(M).dummy==="border"){let P=b.predecessors(M);P.length&&($=b.node(P[0]).order,x(T,L,z,O,$),L=z,O=$)}x(T,L,T.length,$,k.length)}),T}return _.length&&_.reduce(A),S}function i(b,_){if(b.node(_).dummy)return b.predecessors(_).find(S=>b.node(S).dummy)}function a(b,_,S){if(_>S){let A=_;_=S,S=A}let x=b[_];x||(b[_]=x={}),x[S]=!0}function o(b,_,S){if(_>S){let x=_;_=S,S=x}return!!b[_]&&Object.hasOwn(b[_],S)}function l(b,_,S,x){let A={},k={},T={};return _.forEach(O=>{O.forEach(($,L)=>{A[$]=$,k[$]=$,T[$]=L})}),_.forEach(O=>{let $=-1;O.forEach(L=>{let M=x(L);if(M.length){M=M.sort((P,q)=>T[P]-T[q]);let z=(M.length-1)/2;for(let P=Math.floor(z),q=Math.ceil(z);P<=q;++P){let D=M[P];k[L]===L&&$<T[D]&&!o(S,L,D)&&(k[D]=L,k[L]=A[L]=A[D],$=T[D])}}})}),{root:A,align:k}}function c(b,_,S,x,A){let k={},T=f(b,_,S,A),O=A?"borderLeft":"borderRight";function $(z,P){let q=T.nodes(),D=q.pop(),H={};for(;D;)H[D]?z(D):(H[D]=!0,q.push(D),q=q.concat(P(D))),D=q.pop()}function L(z){k[z]=T.inEdges(z).reduce((P,q)=>Math.max(P,k[q.v]+T.edge(q)),0)}function M(z){let P=T.outEdges(z).reduce((D,H)=>Math.min(D,k[H.w]-T.edge(H)),Number.POSITIVE_INFINITY),q=b.node(z);P!==Number.POSITIVE_INFINITY&&q.borderType!==O&&(k[z]=Math.max(k[z],P))}return $(L,T.predecessors.bind(T)),$(M,T.successors.bind(T)),Object.keys(x).forEach(z=>k[z]=k[S[z]]),k}function f(b,_,S,x){let A=new e,k=b.graph(),T=v(k.nodesep,k.edgesep,x);return _.forEach(O=>{let $;O.forEach(L=>{let M=S[L];if(A.setNode(M),$){var z=S[$],P=A.edge(z,M);A.setEdge(z,M,Math.max(T(b,L,$),P||0))}$=L})}),A}function d(b,_){return Object.values(_).reduce((S,x)=>{let A=Number.NEGATIVE_INFINITY,k=Number.POSITIVE_INFINITY;Object.entries(x).forEach(([O,$])=>{let L=w(b,O)/2;A=Math.max($+L,A),k=Math.min($-L,k)});const T=A-k;return T<S[0]&&(S=[T,x]),S},[Number.POSITIVE_INFINITY,null])[1]}function h(b,_){let S=Object.values(_),x=t.applyWithChunking(Math.min,S),A=t.applyWithChunking(Math.max,S);["u","d"].forEach(k=>{["l","r"].forEach(T=>{let O=k+T,$=b[O];if($===_)return;let L=Object.values($),M=x-t.applyWithChunking(Math.min,L);T!=="l"&&(M=A-t.applyWithChunking(Math.max,L)),M&&(b[O]=t.mapValues($,z=>z+M))})})}function m(b,_){return t.mapValues(b.ul,(S,x)=>{if(_)return b[_.toLowerCase()][x];{let A=Object.values(b).map(k=>k[x]).sort((k,T)=>k-T);return(A[1]+A[2])/2}})}function g(b){let _=t.buildLayerMatrix(b),S=Object.assign(n(b,_),r(b,_)),x={},A;["u","d"].forEach(T=>{A=T==="u"?_:Object.values(_).reverse(),["l","r"].forEach(O=>{O==="r"&&(A=A.map(z=>Object.values(z).reverse()));let $=(T==="u"?b.predecessors:b.successors).bind(b),L=l(b,A,S,$),M=c(b,A,L.root,L.align,O==="r");O==="r"&&(M=t.mapValues(M,z=>-z)),x[T+O]=M})});let k=d(b,x);return h(x,k),m(x,b.graph().align)}function v(b,_,S){return(x,A,k)=>{let T=x.node(A),O=x.node(k),$=0,L;if($+=T.width/2,Object.hasOwn(T,"labelpos"))switch(T.labelpos.toLowerCase()){case"l":L=-T.width/2;break;case"r":L=T.width/2;break}if(L&&($+=S?L:-L),L=0,$+=(T.dummy?_:b)/2,$+=(O.dummy?_:b)/2,$+=O.width/2,Object.hasOwn(O,"labelpos"))switch(O.labelpos.toLowerCase()){case"l":L=O.width/2;break;case"r":L=-O.width/2;break}return L&&($+=S?L:-L),L=0,$}}function w(b,_){return b.node(_).width}return bb}var vb,vR;function xie(){if(vR)return vb;vR=1;let e=Jt(),t=_ie().positionX;vb=n;function n(i){i=e.asNonCompoundGraph(i),r(i),Object.entries(t(i)).forEach(([a,o])=>i.node(a).x=o)}function r(i){let a=e.buildLayerMatrix(i),o=i.graph().ranksep,l=0;a.forEach(c=>{const f=c.reduce((d,h)=>{const m=i.node(h).height;return d>m?d:m},0);c.forEach(d=>i.node(d).y=l+f/2),l+=f+o})}return vb}var _b,_R;function wie(){if(_R)return _b;_R=1;let e=rie(),t=iie(),n=sie(),r=Jt().normalizeRanks,i=oie(),a=Jt().removeEmptyRanks,o=lie(),l=uie(),c=cie(),f=vie(),d=xie(),h=Jt(),m=Ir().Graph;_b=g;function g(j,I){let U=I&&I.debugTiming?h.time:h.notime;U("layout",()=>{let Y=U(" buildLayoutGraph",()=>$(j));U(" runLayout",()=>v(Y,U,I)),U(" updateInputGraph",()=>w(j,Y))})}function v(j,I,U){I(" makeSpaceForEdgeLabels",()=>L(j)),I(" removeSelfEdges",()=>K(j)),I(" acyclic",()=>e.run(j)),I(" nestingGraph.run",()=>o.run(j)),I(" rank",()=>n(h.asNonCompoundGraph(j))),I(" injectEdgeLabelProxies",()=>M(j)),I(" removeEmptyRanks",()=>a(j)),I(" nestingGraph.cleanup",()=>o.cleanup(j)),I(" normalizeRanks",()=>r(j)),I(" assignRankMinMax",()=>z(j)),I(" removeEdgeLabelProxies",()=>P(j)),I(" normalize.run",()=>t.run(j)),I(" parentDummyChains",()=>i(j)),I(" addBorderSegments",()=>l(j)),I(" order",()=>f(j,U)),I(" insertSelfEdges",()=>Q(j)),I(" adjustCoordinateSystem",()=>c.adjust(j)),I(" position",()=>d(j)),I(" positionSelfEdges",()=>R(j)),I(" removeBorderNodes",()=>G(j)),I(" normalize.undo",()=>t.undo(j)),I(" fixupEdgeLabelCoords",()=>H(j)),I(" undoCoordinateSystem",()=>c.undo(j)),I(" translateGraph",()=>q(j)),I(" assignNodeIntersects",()=>D(j)),I(" reversePoints",()=>B(j)),I(" acyclic.undo",()=>e.undo(j))}function w(j,I){j.nodes().forEach(U=>{let Y=j.node(U),ne=I.node(U);Y&&(Y.x=ne.x,Y.y=ne.y,Y.rank=ne.rank,I.children(U).length&&(Y.width=ne.width,Y.height=ne.height))}),j.edges().forEach(U=>{let Y=j.edge(U),ne=I.edge(U);Y.points=ne.points,Object.hasOwn(ne,"x")&&(Y.x=ne.x,Y.y=ne.y)}),j.graph().width=I.graph().width,j.graph().height=I.graph().height}let b=["nodesep","edgesep","ranksep","marginx","marginy"],_={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},S=["acyclicer","ranker","rankdir","align"],x=["width","height"],A={width:0,height:0},k=["minlen","weight","width","height","labeloffset"],T={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},O=["labelpos"];function $(j){let I=new m({multigraph:!0,compound:!0}),U=X(j.graph());return I.setGraph(Object.assign({},_,V(U,b),h.pick(U,S))),j.nodes().forEach(Y=>{let ne=X(j.node(Y));const ae=V(ne,x);Object.keys(A).forEach(re=>{ae[re]===void 0&&(ae[re]=A[re])}),I.setNode(Y,ae),I.setParent(Y,j.parent(Y))}),j.edges().forEach(Y=>{let ne=X(j.edge(Y));I.setEdge(Y,Object.assign({},T,V(ne,k),h.pick(ne,O)))}),I}function L(j){let I=j.graph();I.ranksep/=2,j.edges().forEach(U=>{let Y=j.edge(U);Y.minlen*=2,Y.labelpos.toLowerCase()!=="c"&&(I.rankdir==="TB"||I.rankdir==="BT"?Y.width+=Y.labeloffset:Y.height+=Y.labeloffset)})}function M(j){j.edges().forEach(I=>{let U=j.edge(I);if(U.width&&U.height){let Y=j.node(I.v),ae={rank:(j.node(I.w).rank-Y.rank)/2+Y.rank,e:I};h.addDummyNode(j,"edge-proxy",ae,"_ep")}})}function z(j){let I=0;j.nodes().forEach(U=>{let Y=j.node(U);Y.borderTop&&(Y.minRank=j.node(Y.borderTop).rank,Y.maxRank=j.node(Y.borderBottom).rank,I=Math.max(I,Y.maxRank))}),j.graph().maxRank=I}function P(j){j.nodes().forEach(I=>{let U=j.node(I);U.dummy==="edge-proxy"&&(j.edge(U.e).labelRank=U.rank,j.removeNode(I))})}function q(j){let I=Number.POSITIVE_INFINITY,U=0,Y=Number.POSITIVE_INFINITY,ne=0,ae=j.graph(),re=ae.marginx||0,le=ae.marginy||0;function W(J){let se=J.x,fe=J.y,me=J.width,xe=J.height;I=Math.min(I,se-me/2),U=Math.max(U,se+me/2),Y=Math.min(Y,fe-xe/2),ne=Math.max(ne,fe+xe/2)}j.nodes().forEach(J=>W(j.node(J))),j.edges().forEach(J=>{let se=j.edge(J);Object.hasOwn(se,"x")&&W(se)}),I-=re,Y-=le,j.nodes().forEach(J=>{let se=j.node(J);se.x-=I,se.y-=Y}),j.edges().forEach(J=>{let se=j.edge(J);se.points.forEach(fe=>{fe.x-=I,fe.y-=Y}),Object.hasOwn(se,"x")&&(se.x-=I),Object.hasOwn(se,"y")&&(se.y-=Y)}),ae.width=U-I+re,ae.height=ne-Y+le}function D(j){j.edges().forEach(I=>{let U=j.edge(I),Y=j.node(I.v),ne=j.node(I.w),ae,re;U.points?(ae=U.points[0],re=U.points[U.points.length-1]):(U.points=[],ae=ne,re=Y),U.points.unshift(h.intersectRect(Y,ae)),U.points.push(h.intersectRect(ne,re))})}function H(j){j.edges().forEach(I=>{let U=j.edge(I);if(Object.hasOwn(U,"x"))switch((U.labelpos==="l"||U.labelpos==="r")&&(U.width-=U.labeloffset),U.labelpos){case"l":U.x-=U.width/2+U.labeloffset;break;case"r":U.x+=U.width/2+U.labeloffset;break}})}function B(j){j.edges().forEach(I=>{let U=j.edge(I);U.reversed&&U.points.reverse()})}function G(j){j.nodes().forEach(I=>{if(j.children(I).length){let U=j.node(I),Y=j.node(U.borderTop),ne=j.node(U.borderBottom),ae=j.node(U.borderLeft[U.borderLeft.length-1]),re=j.node(U.borderRight[U.borderRight.length-1]);U.width=Math.abs(re.x-ae.x),U.height=Math.abs(ne.y-Y.y),U.x=ae.x+U.width/2,U.y=Y.y+U.height/2}}),j.nodes().forEach(I=>{j.node(I).dummy==="border"&&j.removeNode(I)})}function K(j){j.edges().forEach(I=>{if(I.v===I.w){var U=j.node(I.v);U.selfEdges||(U.selfEdges=[]),U.selfEdges.push({e:I,label:j.edge(I)}),j.removeEdge(I)}})}function Q(j){var I=h.buildLayerMatrix(j);I.forEach(U=>{var Y=0;U.forEach((ne,ae)=>{var re=j.node(ne);re.order=ae+Y,(re.selfEdges||[]).forEach(le=>{h.addDummyNode(j,"selfedge",{width:le.label.width,height:le.label.height,rank:re.rank,order:ae+ ++Y,e:le.e,label:le.label},"_se")}),delete re.selfEdges})})}function R(j){j.nodes().forEach(I=>{var U=j.node(I);if(U.dummy==="selfedge"){var Y=j.node(U.e.v),ne=Y.x+Y.width/2,ae=Y.y,re=U.x-ne,le=Y.height/2;j.setEdge(U.e,U.label),j.removeNode(I),U.label.points=[{x:ne+2*re/3,y:ae-le},{x:ne+5*re/6,y:ae-le},{x:ne+re,y:ae},{x:ne+5*re/6,y:ae+le},{x:ne+2*re/3,y:ae+le}],U.label.x=U.x,U.label.y=U.y}})}function V(j,I){return h.mapValues(h.pick(j,I),Number)}function X(j){var I={};return j&&Object.entries(j).forEach(([U,Y])=>{typeof U=="string"&&(U=U.toLowerCase()),I[U]=Y}),I}return _b}var xb,xR;function Sie(){if(xR)return xb;xR=1;let e=Jt(),t=Ir().Graph;xb={debugOrdering:n};function n(r){let i=e.buildLayerMatrix(r),a=new t({compound:!0,multigraph:!0}).setGraph({});return r.nodes().forEach(o=>{a.setNode(o,{label:o}),a.setParent(o,"layer"+r.node(o).rank)}),r.edges().forEach(o=>a.setEdge(o.v,o.w,{},o.name)),i.forEach((o,l)=>{let c="layer"+l;a.setNode(c,{rank:"same"}),o.reduce((f,d)=>(a.setEdge(f,d,{style:"invis"}),d))}),a}return xb}var wb,wR;function Eie(){return wR||(wR=1,wb="1.1.4"),wb}var Sb,SR;function kie(){return SR||(SR=1,Sb={graphlib:Ir(),layout:wie(),debug:Sie(),util:{time:Jt().time,notime:Jt().notime},version:Eie()}),Sb}var Aie=kie();const ER=zn(Aie);function Tie(e){const t=new Map,n=[],r=a=>{const o=a.id.split(":"),l=o.slice(0,-1).join(":");if(o.length!==1){if(!t.has(l)){const c={id:l,type:"group",data:{label:l.split(":").pop(),name:l.split(":").pop()},position:{x:0,y:0},style:{},parentId:void 0},f=r(c);f&&(c.parentId=f.id),t.set(l,c)}return t.get(l)}};return e.forEach(a=>{const o={...a,id:a.id.toString(),position:{x:0,y:0},data:{label:a.id.split(":").pop(),name:a.id.split(":").pop()}},l=r(o);l&&(o.parentId=l.id.toString()),n.push(o)}),[...Array.from(t.values()),...n]}const Cie={group:({data:e})=>N.jsx("div",{className:"absolute bottom-full left-0",children:N.jsx("span",{children:e.name})})},Oie=(e,t)=>{const n=e.map(r=>{const i=t.find(c=>c.id===r.source.toString()),a=t.find(c=>c.id===r.target.toString()),o=i==null?void 0:i.id,l=a==null?void 0:a.id;return{id:`${o}=${l}`,source:o,target:l,animated:r.conditional,label:r.data,style:{stroke:r.conditional?"#2563eb":"#64748b"}}});if(!n.find(r=>r.target==="__end__")){const r=[...t].reverse().find(i=>i.id.endsWith(":__end__"));r&&n.push({id:`${r.id}=__end__`,source:r.id,target:"__end__",type:"smoothstep"})}return n},Nie=()=>{const{fitView:e}=Ip(),{graphVisualize:t,currentNodeName:n}=Ts(),r=t||{nodes:[],edges:[]},i=Tie(r.nodes.map(g=>({...g,type:"default"}))),a=Oie(r.edges,i),[o,l,c]=gre(i),[f,d,h]=yre(a),m=te.useCallback(g=>{const v=kR(o,f,{direction:g});l([...v.nodes]),d([...v.edges]),e()},[o,f]);return te.useEffect(()=>{if(r.nodes.length>0){const g=kR(i,a,{direction:"TB"});l([...g.nodes]),d([...g.edges]),e()}},[r]),te.useEffect(()=>{const g=o.findIndex(v=>v.id.endsWith(n));if(g!==-1){const v=[...o].map(w=>({...w,selected:!1}));v[g]={...v[g],selected:!0},l(v),e()}},[n]),N.jsx("div",{className:"h-full relative overflow-hidden border-l",children:N.jsxs(mre,{nodes:o,edges:f,onNodesChange:c,onEdgesChange:h,fitView:!0,className:"w-full h-full",nodeTypes:Cie,children:[N.jsx(wre,{}),N.jsx(Ore,{}),N.jsxs(jc,{position:"top-right",className:"flex gap-2",children:[N.jsx("button",{onClick:()=>m("TB"),className:"px-3 py-1.5 bg-white border border-gray-200 rounded-lg text-sm text-gray-700 hover:bg-gray-50 transition-colors",children:"垂直布局"}),N.jsx("button",{onClick:()=>m("LR"),className:"px-3 py-1.5 bg-white border border-gray-200 rounded-lg text-sm text-gray-700 hover:bg-gray-50 transition-colors",children:"水平布局"})]})]})})},kR=(e,t,n)=>{const r=new ER.graphlib.Graph({compound:!0,multigraph:!0}).setDefaultEdgeLabel(()=>({}));r.setGraph({rankdir:n.direction,nodesep:40,ranksep:40,edgesep:20}),e.forEach(l=>{l.type!=="group"&&r.setNode(l.id,{...l,width:128,height:20})}),t.forEach(l=>r.setEdge(l.source,l.target)),ER.layout(r);const i=e.map(l=>{const c=r.node(l.id);if(!c)return{...l};let f=0,d=0;return f=c.x+((c==null?void 0:c.width)??0),d=c.y+((c==null?void 0:c.height)??0),{...l,position:{x:f,y:d},_p:c,width:c.width,height:c.height}}),a=new Map,o=15;return[...i].reverse().forEach(l=>{if(l.type==="group"){const c=a.get(l.id)||[],f=Math.min(...c.map(g=>g.position.x)),d=Math.min(...c.map(g=>g.position.y)),h=Math.max(...c.map(g=>g.position.x+(g.width??0))),m=Math.max(...c.map(g=>g.position.y+(g.height??0)));l.position.x=f-o,l.position.y=d-o,l.width=h-f+o*2,l.height=m-d+o*2,c.forEach(g=>{g.position.x=g.position.x-l.position.x,g.position.y=g.position.y-l.position.y})}l.parentId&&a.set(l.parentId,[...a.get(l.parentId)??[],l])}),{nodes:i,edges:t}};function Rie(){return N.jsx(EP,{children:N.jsx(Nie,{})})}const jie=()=>N.jsx(Rie,{});/**
|
|
231
|
+
* @license
|
|
232
|
+
* Copyright 2019 Google LLC
|
|
233
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
234
|
+
*/const $P=Symbol("Comlink.proxy"),Mie=Symbol("Comlink.endpoint"),$ie=Symbol("Comlink.releaseProxy"),Eb=Symbol("Comlink.finalizer"),Ch=Symbol("Comlink.thrown"),DP=e=>typeof e=="object"&&e!==null||typeof e=="function",Die={canHandle:e=>DP(e)&&e[$P],serialize(e){const{port1:t,port2:n}=new MessageChannel;return PP(e,t),[n,[n]]},deserialize(e){return e.start(),zP(e)}},Iie={canHandle:e=>DP(e)&&Ch in e,serialize({value:e}){let t;return e instanceof Error?t={isError:!0,value:{message:e.message,name:e.name,stack:e.stack}}:t={isError:!1,value:e},[t,[]]},deserialize(e){throw e.isError?Object.assign(new Error(e.value.message),e.value):e.value}},IP=new Map([["proxy",Die],["throw",Iie]]);function Pie(e,t){for(const n of e)if(t===n||n==="*"||n instanceof RegExp&&n.test(t))return!0;return!1}function PP(e,t=globalThis,n=["*"]){t.addEventListener("message",function r(i){if(!i||!i.data)return;if(!Pie(n,i.origin)){console.warn(`Invalid origin '${i.origin}' for comlink proxy`);return}const{id:a,type:o,path:l}=Object.assign({path:[]},i.data),c=(i.data.argumentList||[]).map(fs);let f;try{const d=l.slice(0,-1).reduce((m,g)=>m[g],e),h=l.reduce((m,g)=>m[g],e);switch(o){case"GET":f=h;break;case"SET":d[l.slice(-1)[0]]=fs(i.data.value),f=!0;break;case"APPLY":f=h.apply(d,c);break;case"CONSTRUCT":{const m=new h(...c);f=Uie(m)}break;case"ENDPOINT":{const{port1:m,port2:g}=new MessageChannel;PP(e,g),f=Bie(m,[m])}break;case"RELEASE":f=void 0;break;default:return}}catch(d){f={value:d,[Ch]:0}}Promise.resolve(f).catch(d=>({value:d,[Ch]:0})).then(d=>{const[h,m]=up(d);t.postMessage(Object.assign(Object.assign({},h),{id:a}),m),o==="RELEASE"&&(t.removeEventListener("message",r),LP(t),Eb in e&&typeof e[Eb]=="function"&&e[Eb]())}).catch(d=>{const[h,m]=up({value:new TypeError("Unserializable return value"),[Ch]:0});t.postMessage(Object.assign(Object.assign({},h),{id:a}),m)})}),t.start&&t.start()}function Lie(e){return e.constructor.name==="MessagePort"}function LP(e){Lie(e)&&e.close()}function zP(e,t){const n=new Map;return e.addEventListener("message",function(i){const{data:a}=i;if(!a||!a.id)return;const o=n.get(a.id);if(o)try{o(a)}finally{n.delete(a.id)}}),zw(e,n,[],t)}function jd(e){if(e)throw new Error("Proxy has been released and is not useable")}function qP(e){return Mo(e,new Map,{type:"RELEASE"}).then(()=>{LP(e)})}const op=new WeakMap,lp="FinalizationRegistry"in globalThis&&new FinalizationRegistry(e=>{const t=(op.get(e)||0)-1;op.set(e,t),t===0&&qP(e)});function zie(e,t){const n=(op.get(t)||0)+1;op.set(t,n),lp&&lp.register(e,t,e)}function qie(e){lp&&lp.unregister(e)}function zw(e,t,n=[],r=function(){}){let i=!1;const a=new Proxy(r,{get(o,l){if(jd(i),l===$ie)return()=>{qie(a),qP(e),t.clear(),i=!0};if(l==="then"){if(n.length===0)return{then:()=>a};const c=Mo(e,t,{type:"GET",path:n.map(f=>f.toString())}).then(fs);return c.then.bind(c)}return zw(e,t,[...n,l])},set(o,l,c){jd(i);const[f,d]=up(c);return Mo(e,t,{type:"SET",path:[...n,l].map(h=>h.toString()),value:f},d).then(fs)},apply(o,l,c){jd(i);const f=n[n.length-1];if(f===Mie)return Mo(e,t,{type:"ENDPOINT"}).then(fs);if(f==="bind")return zw(e,t,n.slice(0,-1));const[d,h]=AR(c);return Mo(e,t,{type:"APPLY",path:n.map(m=>m.toString()),argumentList:d},h).then(fs)},construct(o,l){jd(i);const[c,f]=AR(l);return Mo(e,t,{type:"CONSTRUCT",path:n.map(d=>d.toString()),argumentList:c},f).then(fs)}});return zie(a,e),a}function Fie(e){return Array.prototype.concat.apply([],e)}function AR(e){const t=e.map(up);return[t.map(n=>n[0]),Fie(t.map(n=>n[1]))]}const FP=new WeakMap;function Bie(e,t){return FP.set(e,t),e}function Uie(e){return Object.assign(e,{[$P]:!0})}function Vie(e,t=globalThis,n="*"){return{postMessage:(r,i)=>e.postMessage(r,n,i),addEventListener:t.addEventListener.bind(t),removeEventListener:t.removeEventListener.bind(t)}}function up(e){for(const[t,n]of IP)if(n.canHandle(e)){const[r,i]=n.serialize(e);return[{type:"HANDLER",name:t,value:r},i]}return[{type:"RAW",value:e},FP.get(e)||[]]}function fs(e){switch(e.type){case"HANDLER":return IP.get(e.name).deserialize(e.value);case"RAW":return e.value}}function Mo(e,t,n,r){return new Promise(i=>{const a=Hie();t.set(a,i),e.start&&e.start(),e.postMessage(Object.assign({id:a},n),r)})}function Hie(){return new Array(4).fill(0).map(()=>Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16)).join("-")}const BP=te.createContext({artifacts:[],currentArtifact:null,setCurrentArtifactById:()=>{},getArtifactVersions:()=>[],showArtifact:!1,setShowArtifact:()=>{}}),zp=()=>te.useContext(BP),Gie=({children:e})=>{const[t,n]=te.useState([]),[r,i]=te.useState(!1),{renderMessages:a}=Ts(),[o,l]=te.useState(null),c=d=>t.filter(h=>h.filename===d).sort((h,m)=>h.version-m.version);te.useEffect(()=>{if(!a)return;const d=a.filter(g=>g.type==="tool").filter(g=>g.name==="create_artifacts"),h=new Map,m=d.map(g=>{const v=JSON.parse(g.tool_input),w=v.filename,_=(h.get(w)||0)+1;return h.set(w,_),{id:g.id,code:v.code,filename:w,version:_,filetype:v.filetype}});n(m)},[a]);const f=d=>{i(!0),l(t.find(h=>h.id===d)||null)};return N.jsx(BP.Provider,{value:{artifacts:t,currentArtifact:o,setCurrentArtifactById:f,getArtifactVersions:c,showArtifact:r,setShowArtifact:i},children:e})},Yie=()=>{const{currentArtifact:e}=zp();return e?N.jsx("div",{className:"h-full w-full overflow-auto",children:N.jsx("pre",{children:e.code})}):N.jsx("div",{className:"h-full w-full flex items-center justify-center text-gray-500",children:"请选择一个文件"})},Zie=()=>{const e=te.useRef(null),[t,n]=te.useState(!1),{currentArtifact:r,getArtifactVersions:i,setCurrentArtifactById:a,artifacts:o}=zp(),[l,c]=te.useState(0),[f,d]=te.useState("preview"),[h,m]=te.useState(!1),g=async S=>{const x=zP(Vie(S.contentWindow));return await Promise.race(Array(100).fill(0).map((A,k)=>new Promise(T=>{setTimeout(async()=>{await x.init()&&T(k)},100*k)}))),x},v=async()=>{if(console.log(l),!!e.current){n(!0);try{await(await g(e.current)).run(r==null?void 0:r.code,r==null?void 0:r.filename,r==null?void 0:r.filetype)}catch(S){console.error("Failed to run code:",S)}finally{n(!1)}}},w=()=>{c(S=>S+1)};if(te.useEffect(()=>{e.current&&v()},[l]),!r)return N.jsx("div",{className:"h-full w-full flex items-center justify-center text-gray-500",children:"请选择一个文件"});const b=i(r.filename),_=Array.from(new Set(o.map(S=>S.filename)));return N.jsxs("div",{className:"h-full w-full flex flex-col",children:[N.jsxs("div",{className:"flex items-center justify-between p-2 border-b",children:[N.jsxs("div",{className:"flex items-center space-x-4",children:[N.jsxs("div",{className:"flex space-x-2",children:[N.jsx("button",{className:`px-3 py-1 rounded ${f==="preview"?"bg-blue-500 text-white":"bg-gray-100 text-gray-700"}`,onClick:()=>{d("preview"),w()},children:"预览"}),N.jsx("button",{className:`px-3 py-1 rounded ${f==="source"?"bg-blue-500 text-white":"bg-gray-100 text-gray-700"}`,onClick:()=>d("source"),children:"源代码"})]}),N.jsxs("div",{className:"relative",children:[N.jsxs("button",{className:"flex items-center space-x-2 px-3 py-1 bg-gray-100 rounded hover:bg-gray-200",onClick:()=>m(!h),children:[N.jsx("span",{children:r.filename}),N.jsx(L5,{className:"w-4 h-4"})]}),h&&N.jsx("div",{className:"absolute top-full left-0 mt-1 w-48 bg-white border rounded-md shadow-lg z-10",children:_.map(S=>{const x=i(S),A=x[x.length-1];return N.jsx("button",{className:"w-full text-left px-3 py-2 hover:bg-gray-100",onClick:()=>{a(A.id),m(!1)},children:S},S)})})]}),N.jsxs("div",{className:"flex items-center space-x-2",children:[N.jsx("span",{className:"text-sm text-gray-500",children:"版本:"}),N.jsx("div",{className:"flex space-x-1",children:b.map(S=>N.jsxs("button",{className:`px-2 py-1 text-sm rounded ${S.id===r.id?"bg-blue-500 text-white":"bg-gray-100 text-gray-700 hover:bg-gray-200"}`,onClick:()=>a(S.id),children:["v",S.version]},S.id))})]})]}),f==="preview"&&N.jsxs("div",{className:"flex space-x-2",children:[N.jsx("button",{disabled:t,className:"px-3 py-1 bg-gray-100 rounded hover:bg-gray-200 disabled:opacity-50",children:t?"Running...":"Run"}),N.jsx("button",{onClick:w,disabled:t,className:"px-3 py-1 bg-gray-100 rounded hover:bg-gray-200 disabled:opacity-50",children:"Refresh"})]})]}),N.jsx("div",{className:"flex-1 overflow-auto",children:f==="preview"?N.jsx("iframe",{ref:e,src:"https://langgraph-artifacts.netlify.app/index.html",className:"w-full h-full border border-gray-300"},l):N.jsx(Yie,{})})]})};function lt(e){return typeof e!="object"||e===null||typeof e.lastModified=="number"&&typeof File<"u"&&e instanceof File||typeof e.getMonth=="function"&&typeof Date<"u"&&e instanceof Date?!1:!Array.isArray(e)}function Kie(e){return e.additionalItems===!0&&console.warn("additionalItems=true is currently not supported"),lt(e.additionalItems)}function TR(e){if(e==="")return;if(e===null)return null;if(/\.$/.test(e)||/\.0$/.test(e)||/\.\d*0$/.test(e))return e;const t=Number(e);return typeof t=="number"&&!Number.isNaN(t)?t:e}const Mc="__additional_property",qw="additionalProperties",ll="allOf",Mr="anyOf",Di="const",Xie="default",qp="dependencies",Wie="enum",Jn="__errors",Ra="$id",Qie="if",Ma="items",Jie="_$junk_option_schema_id$_",Oh="$name",tr="oneOf",Bt="properties",eae="required",cp="submitButtonOptions",rn="$ref",PS="__rjsf_additionalProperties",UP="__rjsf_rootSchema",tae="ui:field",LS="ui:widget",Zu="ui:options",nae="ui:globalOptions";function ot(e={},t={}){return Object.keys(e).filter(n=>n.indexOf("ui:")===0).reduce((n,r)=>{const i=e[r];return r===LS&<(i)?(console.error("Setting options via ui:widget object is no longer supported, use ui:options instead"),n):r===Zu&<(i)?{...n,...i}:{...n,[r.substring(3)]:i}},{...t})}function rae(e,t={},n){if(!e.additionalProperties)return!1;const{expandable:r=!0}=ot(t);return r===!1?r:e.maxProperties!==void 0&&n?Object.keys(n).length<e.maxProperties:!0}var VP=typeof global=="object"&&global&&global.Object===Object&&global,iae=typeof self=="object"&&self&&self.Object===Object&&self,ni=VP||iae||Function("return this")(),br=ni.Symbol,HP=Object.prototype,aae=HP.hasOwnProperty,sae=HP.toString,Ou=br?br.toStringTag:void 0;function oae(e){var t=aae.call(e,Ou),n=e[Ou];try{e[Ou]=void 0;var r=!0}catch{}var i=sae.call(e);return r&&(t?e[Ou]=n:delete e[Ou]),i}var lae=Object.prototype,uae=lae.toString;function cae(e){return uae.call(e)}var fae="[object Null]",dae="[object Undefined]",CR=br?br.toStringTag:void 0;function qi(e){return e==null?e===void 0?dae:fae:CR&&CR in Object(e)?oae(e):cae(e)}function GP(e,t){return function(n){return e(t(n))}}var Fp=GP(Object.getPrototypeOf,Object);function vr(e){return e!=null&&typeof e=="object"}var hae="[object Object]",pae=Function.prototype,mae=Object.prototype,YP=pae.toString,gae=mae.hasOwnProperty,yae=YP.call(Object);function Ss(e){if(!vr(e)||qi(e)!=hae)return!1;var t=Fp(e);if(t===null)return!0;var n=gae.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&YP.call(n)==yae}function fp(e){const t={[Jn]:[],addError(n){this[Jn].push(n)}};if(Array.isArray(e))return e.reduce((n,r,i)=>({...n,[i]:fp(r)}),t);if(Ss(e)){const n=e;return Object.keys(n).reduce((r,i)=>({...r,[i]:fp(n[i])}),t)}return t}function bae(){this.__data__=[],this.size=0}function $c(e,t){return e===t||e!==e&&t!==t}function Bp(e,t){for(var n=e.length;n--;)if($c(e[n][0],t))return n;return-1}var vae=Array.prototype,_ae=vae.splice;function xae(e){var t=this.__data__,n=Bp(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():_ae.call(t,n,1),--this.size,!0}function wae(e){var t=this.__data__,n=Bp(t,e);return n<0?void 0:t[n][1]}function Sae(e){return Bp(this.__data__,e)>-1}function Eae(e,t){var n=this.__data__,r=Bp(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function Fi(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Fi.prototype.clear=bae;Fi.prototype.delete=xae;Fi.prototype.get=wae;Fi.prototype.has=Sae;Fi.prototype.set=Eae;function kae(){this.__data__=new Fi,this.size=0}function Aae(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function Tae(e){return this.__data__.get(e)}function Cae(e){return this.__data__.has(e)}function Mt(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Oae="[object AsyncFunction]",Nae="[object Function]",Rae="[object GeneratorFunction]",jae="[object Proxy]";function Up(e){if(!Mt(e))return!1;var t=qi(e);return t==Nae||t==Rae||t==Oae||t==jae}var kb=ni["__core-js_shared__"],OR=function(){var e=/[^.]+$/.exec(kb&&kb.keys&&kb.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function Mae(e){return!!OR&&OR in e}var $ae=Function.prototype,Dae=$ae.toString;function Cs(e){if(e!=null){try{return Dae.call(e)}catch{}try{return e+""}catch{}}return""}var Iae=/[\\^$.*+?()[\]{}|]/g,Pae=/^\[object .+?Constructor\]$/,Lae=Function.prototype,zae=Object.prototype,qae=Lae.toString,Fae=zae.hasOwnProperty,Bae=RegExp("^"+qae.call(Fae).replace(Iae,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Uae(e){if(!Mt(e)||Mae(e))return!1;var t=Up(e)?Bae:Pae;return t.test(Cs(e))}function Vae(e,t){return e==null?void 0:e[t]}function Os(e,t){var n=Vae(e,t);return Uae(n)?n:void 0}var mc=Os(ni,"Map"),gc=Os(Object,"create");function Hae(){this.__data__=gc?gc(null):{},this.size=0}function Gae(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var Yae="__lodash_hash_undefined__",Zae=Object.prototype,Kae=Zae.hasOwnProperty;function Xae(e){var t=this.__data__;if(gc){var n=t[e];return n===Yae?void 0:n}return Kae.call(t,e)?t[e]:void 0}var Wae=Object.prototype,Qae=Wae.hasOwnProperty;function Jae(e){var t=this.__data__;return gc?t[e]!==void 0:Qae.call(t,e)}var ese="__lodash_hash_undefined__";function tse(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=gc&&t===void 0?ese:t,this}function Es(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Es.prototype.clear=Hae;Es.prototype.delete=Gae;Es.prototype.get=Xae;Es.prototype.has=Jae;Es.prototype.set=tse;function nse(){this.size=0,this.__data__={hash:new Es,map:new(mc||Fi),string:new Es}}function rse(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Vp(e,t){var n=e.__data__;return rse(t)?n[typeof t=="string"?"string":"hash"]:n.map}function ise(e){var t=Vp(this,e).delete(e);return this.size-=t?1:0,t}function ase(e){return Vp(this,e).get(e)}function sse(e){return Vp(this,e).has(e)}function ose(e,t){var n=Vp(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function Bi(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Bi.prototype.clear=nse;Bi.prototype.delete=ise;Bi.prototype.get=ase;Bi.prototype.has=sse;Bi.prototype.set=ose;var lse=200;function use(e,t){var n=this.__data__;if(n instanceof Fi){var r=n.__data__;if(!mc||r.length<lse-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Bi(r)}return n.set(e,t),this.size=n.size,this}function Dr(e){var t=this.__data__=new Fi(e);this.size=t.size}Dr.prototype.clear=kae;Dr.prototype.delete=Aae;Dr.prototype.get=Tae;Dr.prototype.has=Cae;Dr.prototype.set=use;var cse="__lodash_hash_undefined__";function fse(e){return this.__data__.set(e,cse),this}function dse(e){return this.__data__.has(e)}function Qo(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new Bi;++t<n;)this.add(e[t])}Qo.prototype.add=Qo.prototype.push=fse;Qo.prototype.has=dse;function hse(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function zS(e,t){return e.has(t)}var pse=1,mse=2;function ZP(e,t,n,r,i,a){var o=n&pse,l=e.length,c=t.length;if(l!=c&&!(o&&c>l))return!1;var f=a.get(e),d=a.get(t);if(f&&d)return f==t&&d==e;var h=-1,m=!0,g=n&mse?new Qo:void 0;for(a.set(e,t),a.set(t,e);++h<l;){var v=e[h],w=t[h];if(r)var b=o?r(w,v,h,t,e,a):r(v,w,h,e,t,a);if(b!==void 0){if(b)continue;m=!1;break}if(g){if(!hse(t,function(_,S){if(!zS(g,S)&&(v===_||i(v,_,n,r,a)))return g.push(S)})){m=!1;break}}else if(!(v===w||i(v,w,n,r,a))){m=!1;break}}return a.delete(e),a.delete(t),m}var dp=ni.Uint8Array;function gse(e){var t=-1,n=Array(e.size);return e.forEach(function(r,i){n[++t]=[i,r]}),n}function qS(e){var t=-1,n=Array(e.size);return e.forEach(function(r){n[++t]=r}),n}var yse=1,bse=2,vse="[object Boolean]",_se="[object Date]",xse="[object Error]",wse="[object Map]",Sse="[object Number]",Ese="[object RegExp]",kse="[object Set]",Ase="[object String]",Tse="[object Symbol]",Cse="[object ArrayBuffer]",Ose="[object DataView]",NR=br?br.prototype:void 0,Ab=NR?NR.valueOf:void 0;function Nse(e,t,n,r,i,a,o){switch(n){case Ose:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case Cse:return!(e.byteLength!=t.byteLength||!a(new dp(e),new dp(t)));case vse:case _se:case Sse:return $c(+e,+t);case xse:return e.name==t.name&&e.message==t.message;case Ese:case Ase:return e==t+"";case wse:var l=gse;case kse:var c=r&yse;if(l||(l=qS),e.size!=t.size&&!c)return!1;var f=o.get(e);if(f)return f==t;r|=bse,o.set(e,t);var d=ZP(l(e),l(t),r,i,a,o);return o.delete(e),d;case Tse:if(Ab)return Ab.call(e)==Ab.call(t)}return!1}function FS(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}var an=Array.isArray;function KP(e,t,n){var r=t(e);return an(e)?r:FS(r,n(e))}function Rse(e,t){for(var n=-1,r=e==null?0:e.length,i=0,a=[];++n<r;){var o=e[n];t(o,n,e)&&(a[i++]=o)}return a}function XP(){return[]}var jse=Object.prototype,Mse=jse.propertyIsEnumerable,RR=Object.getOwnPropertySymbols,BS=RR?function(e){return e==null?[]:(e=Object(e),Rse(RR(e),function(t){return Mse.call(e,t)}))}:XP;function WP(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var $se="[object Arguments]";function jR(e){return vr(e)&&qi(e)==$se}var QP=Object.prototype,Dse=QP.hasOwnProperty,Ise=QP.propertyIsEnumerable,Jo=jR(function(){return arguments}())?jR:function(e){return vr(e)&&Dse.call(e,"callee")&&!Ise.call(e,"callee")};function Pse(){return!1}var JP=typeof rr=="object"&&rr&&!rr.nodeType&&rr,MR=JP&&typeof ir=="object"&&ir&&!ir.nodeType&&ir,Lse=MR&&MR.exports===JP,$R=Lse?ni.Buffer:void 0,zse=$R?$R.isBuffer:void 0,ks=zse||Pse,qse=9007199254740991,Fse=/^(?:0|[1-9]\d*)$/;function Hp(e,t){var n=typeof e;return t=t??qse,!!t&&(n=="number"||n!="symbol"&&Fse.test(e))&&e>-1&&e%1==0&&e<t}var Bse=9007199254740991;function US(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Bse}var Use="[object Arguments]",Vse="[object Array]",Hse="[object Boolean]",Gse="[object Date]",Yse="[object Error]",Zse="[object Function]",Kse="[object Map]",Xse="[object Number]",Wse="[object Object]",Qse="[object RegExp]",Jse="[object Set]",eoe="[object String]",toe="[object WeakMap]",noe="[object ArrayBuffer]",roe="[object DataView]",ioe="[object Float32Array]",aoe="[object Float64Array]",soe="[object Int8Array]",ooe="[object Int16Array]",loe="[object Int32Array]",uoe="[object Uint8Array]",coe="[object Uint8ClampedArray]",foe="[object Uint16Array]",doe="[object Uint32Array]",Dt={};Dt[ioe]=Dt[aoe]=Dt[soe]=Dt[ooe]=Dt[loe]=Dt[uoe]=Dt[coe]=Dt[foe]=Dt[doe]=!0;Dt[Use]=Dt[Vse]=Dt[noe]=Dt[Hse]=Dt[roe]=Dt[Gse]=Dt[Yse]=Dt[Zse]=Dt[Kse]=Dt[Xse]=Dt[Wse]=Dt[Qse]=Dt[Jse]=Dt[eoe]=Dt[toe]=!1;function hoe(e){return vr(e)&&US(e.length)&&!!Dt[qi(e)]}function VS(e){return function(t){return e(t)}}var e6=typeof rr=="object"&&rr&&!rr.nodeType&&rr,Ku=e6&&typeof ir=="object"&&ir&&!ir.nodeType&&ir,poe=Ku&&Ku.exports===e6,Tb=poe&&VP.process,el=function(){try{var e=Ku&&Ku.require&&Ku.require("util").types;return e||Tb&&Tb.binding&&Tb.binding("util")}catch{}}(),DR=el&&el.isTypedArray,Dc=DR?VS(DR):hoe,moe=Object.prototype,goe=moe.hasOwnProperty;function t6(e,t){var n=an(e),r=!n&&Jo(e),i=!n&&!r&&ks(e),a=!n&&!r&&!i&&Dc(e),o=n||r||i||a,l=o?WP(e.length,String):[],c=l.length;for(var f in e)(t||goe.call(e,f))&&!(o&&(f=="length"||i&&(f=="offset"||f=="parent")||a&&(f=="buffer"||f=="byteLength"||f=="byteOffset")||Hp(f,c)))&&l.push(f);return l}var yoe=Object.prototype;function Gp(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||yoe;return e===n}var boe=GP(Object.keys,Object),voe=Object.prototype,_oe=voe.hasOwnProperty;function n6(e){if(!Gp(e))return boe(e);var t=[];for(var n in Object(e))_oe.call(e,n)&&n!="constructor"&&t.push(n);return t}function ul(e){return e!=null&&US(e.length)&&!Up(e)}function Yr(e){return ul(e)?t6(e):n6(e)}function Fw(e){return KP(e,Yr,BS)}var xoe=1,woe=Object.prototype,Soe=woe.hasOwnProperty;function Eoe(e,t,n,r,i,a){var o=n&xoe,l=Fw(e),c=l.length,f=Fw(t),d=f.length;if(c!=d&&!o)return!1;for(var h=c;h--;){var m=l[h];if(!(o?m in t:Soe.call(t,m)))return!1}var g=a.get(e),v=a.get(t);if(g&&v)return g==t&&v==e;var w=!0;a.set(e,t),a.set(t,e);for(var b=o;++h<c;){m=l[h];var _=e[m],S=t[m];if(r)var x=o?r(S,_,m,t,e,a):r(_,S,m,e,t,a);if(!(x===void 0?_===S||i(_,S,n,r,a):x)){w=!1;break}b||(b=m=="constructor")}if(w&&!b){var A=e.constructor,k=t.constructor;A!=k&&"constructor"in e&&"constructor"in t&&!(typeof A=="function"&&A instanceof A&&typeof k=="function"&&k instanceof k)&&(w=!1)}return a.delete(e),a.delete(t),w}var Bw=Os(ni,"DataView"),Uw=Os(ni,"Promise"),zo=Os(ni,"Set"),Vw=Os(ni,"WeakMap"),IR="[object Map]",koe="[object Object]",PR="[object Promise]",LR="[object Set]",zR="[object WeakMap]",qR="[object DataView]",Aoe=Cs(Bw),Toe=Cs(mc),Coe=Cs(Uw),Ooe=Cs(zo),Noe=Cs(Vw),yr=qi;(Bw&&yr(new Bw(new ArrayBuffer(1)))!=qR||mc&&yr(new mc)!=IR||Uw&&yr(Uw.resolve())!=PR||zo&&yr(new zo)!=LR||Vw&&yr(new Vw)!=zR)&&(yr=function(e){var t=qi(e),n=t==koe?e.constructor:void 0,r=n?Cs(n):"";if(r)switch(r){case Aoe:return qR;case Toe:return IR;case Coe:return PR;case Ooe:return LR;case Noe:return zR}return t});var Roe=1,FR="[object Arguments]",BR="[object Array]",Md="[object Object]",joe=Object.prototype,UR=joe.hasOwnProperty;function Moe(e,t,n,r,i,a){var o=an(e),l=an(t),c=o?BR:yr(e),f=l?BR:yr(t);c=c==FR?Md:c,f=f==FR?Md:f;var d=c==Md,h=f==Md,m=c==f;if(m&&ks(e)){if(!ks(t))return!1;o=!0,d=!1}if(m&&!d)return a||(a=new Dr),o||Dc(e)?ZP(e,t,n,r,i,a):Nse(e,t,c,n,r,i,a);if(!(n&Roe)){var g=d&&UR.call(e,"__wrapped__"),v=h&&UR.call(t,"__wrapped__");if(g||v){var w=g?e.value():e,b=v?t.value():t;return a||(a=new Dr),i(w,b,n,r,a)}}return m?(a||(a=new Dr),Eoe(e,t,n,r,i,a)):!1}function Yp(e,t,n,r,i){return e===t?!0:e==null||t==null||!vr(e)&&!vr(t)?e!==e&&t!==t:Moe(e,t,n,r,Yp,i)}function $oe(e,t,n){n=typeof n=="function"?n:void 0;var r=n?n(e,t):void 0;return r===void 0?Yp(e,t,void 0,n):!!r}function It(e,t){return $oe(e,t,(n,r)=>{if(typeof n=="function"&&typeof r=="function")return!0})}var Doe="[object Symbol]";function Ic(e){return typeof e=="symbol"||vr(e)&&qi(e)==Doe}var Ioe=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Poe=/^\w*$/;function HS(e,t){if(an(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||Ic(e)?!0:Poe.test(e)||!Ioe.test(e)||t!=null&&e in Object(t)}var Loe="Expected a function";function GS(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(Loe);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],a=n.cache;if(a.has(i))return a.get(i);var o=e.apply(this,r);return n.cache=a.set(i,o)||a,o};return n.cache=new(GS.Cache||Bi),n}GS.Cache=Bi;var zoe=500;function qoe(e){var t=GS(e,function(r){return n.size===zoe&&n.clear(),r}),n=t.cache;return t}var Foe=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Boe=/\\(\\)?/g,r6=qoe(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(Foe,function(n,r,i,a){t.push(i?a.replace(Boe,"$1"):r||n)}),t});function Zp(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}var VR=br?br.prototype:void 0,HR=VR?VR.toString:void 0;function i6(e){if(typeof e=="string")return e;if(an(e))return Zp(e,i6)+"";if(Ic(e))return HR?HR.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function YS(e){return e==null?"":i6(e)}function cl(e,t){return an(e)?e:HS(e,t)?[e]:r6(YS(e))}function Ns(e){if(typeof e=="string"||Ic(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function Kp(e,t){t=cl(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[Ns(t[n++])];return n&&n==r?e:void 0}function Ne(e,t,n){var r=e==null?void 0:Kp(e,t);return r===void 0?n:r}var Uoe="[object Map]",Voe="[object Set]",Hoe=Object.prototype,Goe=Hoe.hasOwnProperty;function tl(e){if(e==null)return!0;if(ul(e)&&(an(e)||typeof e=="string"||typeof e.splice=="function"||ks(e)||Dc(e)||Jo(e)))return!e.length;var t=yr(e);if(t==Uoe||t==Voe)return!e.size;if(Gp(e))return!n6(e).length;for(var n in e)if(Goe.call(e,n))return!1;return!0}var Nu={},GR;function Yoe(){if(GR)return Nu;GR=1;var e=/~/,t=/~[01]/g;function n(f){switch(f){case"~1":return"/";case"~0":return"~"}throw new Error("Invalid tilde escape: "+f)}function r(f){return e.test(f)?f.replace(t,n):f}function i(f,d,h){for(var m,g,v=1,w=d.length;v<w;){if(d[v]==="constructor"||d[v]==="prototype"||d[v]==="__proto__")return f;if(m=r(d[v++]),g=w>v,typeof f[m]>"u"&&(Array.isArray(f)&&m==="-"&&(m=f.length),g&&(d[v]!==""&&d[v]<1/0||d[v]==="-"?f[m]=[]:f[m]={})),!g)break;f=f[m]}var b=f[m];return h===void 0?delete f[m]:f[m]=h,b}function a(f){if(typeof f=="string"){if(f=f.split("/"),f[0]==="")return f;throw new Error("Invalid JSON pointer.")}else if(Array.isArray(f)){for(const d of f)if(typeof d!="string"&&typeof d!="number")throw new Error("Invalid JSON pointer. Must be of type string or number.");return f}throw new Error("Invalid JSON pointer.")}function o(f,d){if(typeof f!="object")throw new Error("Invalid input object.");d=a(d);var h=d.length;if(h===1)return f;for(var m=1;m<h;){if(f=f[r(d[m++])],h===m)return f;if(typeof f!="object"||f===null)return}}function l(f,d,h){if(typeof f!="object")throw new Error("Invalid input object.");if(d=a(d),d.length===0)throw new Error("Invalid JSON pointer for set.");return i(f,d,h)}function c(f){var d=a(f);return{get:function(h){return o(h,d)},set:function(h,m){return l(h,d,m)}}}return Nu.get=o,Nu.set=l,Nu.compile=c,Nu}var Zoe=Yoe();const Koe=zn(Zoe);function ZS(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e}var hp=function(){try{var e=Os(Object,"defineProperty");return e({},"",{}),e}catch{}}();function KS(e,t,n){t=="__proto__"&&hp?hp(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var Xoe=Object.prototype,Woe=Xoe.hasOwnProperty;function XS(e,t,n){var r=e[t];(!(Woe.call(e,t)&&$c(r,n))||n===void 0&&!(t in e))&&KS(e,t,n)}function fl(e,t,n,r){var i=!n;n||(n={});for(var a=-1,o=t.length;++a<o;){var l=t[a],c=void 0;c===void 0&&(c=e[l]),i?KS(n,l,c):XS(n,l,c)}return n}function Qoe(e,t){return e&&fl(t,Yr(t),e)}function Joe(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var ele=Object.prototype,tle=ele.hasOwnProperty;function nle(e){if(!Mt(e))return Joe(e);var t=Gp(e),n=[];for(var r in e)r=="constructor"&&(t||!tle.call(e,r))||n.push(r);return n}function Pc(e){return ul(e)?t6(e,!0):nle(e)}function rle(e,t){return e&&fl(t,Pc(t),e)}var a6=typeof rr=="object"&&rr&&!rr.nodeType&&rr,YR=a6&&typeof ir=="object"&&ir&&!ir.nodeType&&ir,ile=YR&&YR.exports===a6,ZR=ile?ni.Buffer:void 0,KR=ZR?ZR.allocUnsafe:void 0;function s6(e,t){if(t)return e.slice();var n=e.length,r=KR?KR(n):new e.constructor(n);return e.copy(r),r}function WS(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}function ale(e,t){return fl(e,BS(e),t)}var sle=Object.getOwnPropertySymbols,o6=sle?function(e){for(var t=[];e;)FS(t,BS(e)),e=Fp(e);return t}:XP;function ole(e,t){return fl(e,o6(e),t)}function QS(e){return KP(e,Pc,o6)}var lle=Object.prototype,ule=lle.hasOwnProperty;function cle(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]=="string"&&ule.call(e,"index")&&(n.index=e.index,n.input=e.input),n}function JS(e){var t=new e.constructor(e.byteLength);return new dp(t).set(new dp(e)),t}function fle(e,t){var n=t?JS(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}var dle=/\w*$/;function hle(e){var t=new e.constructor(e.source,dle.exec(e));return t.lastIndex=e.lastIndex,t}var XR=br?br.prototype:void 0,WR=XR?XR.valueOf:void 0;function ple(e){return WR?Object(WR.call(e)):{}}function l6(e,t){var n=t?JS(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var mle="[object Boolean]",gle="[object Date]",yle="[object Map]",ble="[object Number]",vle="[object RegExp]",_le="[object Set]",xle="[object String]",wle="[object Symbol]",Sle="[object ArrayBuffer]",Ele="[object DataView]",kle="[object Float32Array]",Ale="[object Float64Array]",Tle="[object Int8Array]",Cle="[object Int16Array]",Ole="[object Int32Array]",Nle="[object Uint8Array]",Rle="[object Uint8ClampedArray]",jle="[object Uint16Array]",Mle="[object Uint32Array]";function $le(e,t,n){var r=e.constructor;switch(t){case Sle:return JS(e);case mle:case gle:return new r(+e);case Ele:return fle(e,n);case kle:case Ale:case Tle:case Cle:case Ole:case Nle:case Rle:case jle:case Mle:return l6(e,n);case yle:return new r;case ble:case xle:return new r(e);case vle:return hle(e);case _le:return new r;case wle:return ple(e)}}var QR=Object.create,u6=function(){function e(){}return function(t){if(!Mt(t))return{};if(QR)return QR(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function c6(e){return typeof e.constructor=="function"&&!Gp(e)?u6(Fp(e)):{}}var Dle="[object Map]";function Ile(e){return vr(e)&&yr(e)==Dle}var JR=el&&el.isMap,Ple=JR?VS(JR):Ile,Lle="[object Set]";function zle(e){return vr(e)&&yr(e)==Lle}var ej=el&&el.isSet,qle=ej?VS(ej):zle,Fle=1,Ble=2,Ule=4,f6="[object Arguments]",Vle="[object Array]",Hle="[object Boolean]",Gle="[object Date]",Yle="[object Error]",d6="[object Function]",Zle="[object GeneratorFunction]",Kle="[object Map]",Xle="[object Number]",h6="[object Object]",Wle="[object RegExp]",Qle="[object Set]",Jle="[object String]",eue="[object Symbol]",tue="[object WeakMap]",nue="[object ArrayBuffer]",rue="[object DataView]",iue="[object Float32Array]",aue="[object Float64Array]",sue="[object Int8Array]",oue="[object Int16Array]",lue="[object Int32Array]",uue="[object Uint8Array]",cue="[object Uint8ClampedArray]",fue="[object Uint16Array]",due="[object Uint32Array]",Rt={};Rt[f6]=Rt[Vle]=Rt[nue]=Rt[rue]=Rt[Hle]=Rt[Gle]=Rt[iue]=Rt[aue]=Rt[sue]=Rt[oue]=Rt[lue]=Rt[Kle]=Rt[Xle]=Rt[h6]=Rt[Wle]=Rt[Qle]=Rt[Jle]=Rt[eue]=Rt[uue]=Rt[cue]=Rt[fue]=Rt[due]=!0;Rt[Yle]=Rt[d6]=Rt[tue]=!1;function Xu(e,t,n,r,i,a){var o,l=t&Fle,c=t&Ble,f=t&Ule;if(n&&(o=i?n(e,r,i,a):n(e)),o!==void 0)return o;if(!Mt(e))return e;var d=an(e);if(d){if(o=cle(e),!l)return WS(e,o)}else{var h=yr(e),m=h==d6||h==Zle;if(ks(e))return s6(e,l);if(h==h6||h==f6||m&&!i){if(o=c||m?{}:c6(e),!l)return c?ole(e,rle(o,e)):ale(e,Qoe(o,e))}else{if(!Rt[h])return i?e:{};o=$le(e,h,l)}}a||(a=new Dr);var g=a.get(e);if(g)return g;a.set(e,o),qle(e)?e.forEach(function(b){o.add(Xu(b,t,n,b,e,a))}):Ple(e)&&e.forEach(function(b,_){o.set(_,Xu(b,t,n,_,e,a))});var v=f?c?QS:Fw:c?Pc:Yr,w=d?void 0:v(e);return ZS(w||e,function(b,_){w&&(_=b,b=e[_]),XS(o,_,Xu(b,t,n,_,e,a))}),o}function hue(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}function pue(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),n=n>i?i:n,n<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var a=Array(i);++r<i;)a[r]=e[r+t];return a}function mue(e,t){return t.length<2?e:Kp(e,pue(t,0,-1))}function p6(e,t){return t=cl(t,e),e=mue(e,t),e==null||delete e[Ns(hue(t))]}function gue(e){return Ss(e)?void 0:e}var tj=br?br.isConcatSpreadable:void 0;function yue(e){return an(e)||Jo(e)||!!(tj&&e&&e[tj])}function Lc(e,t,n,r,i){var a=-1,o=e.length;for(n||(n=yue),i||(i=[]);++a<o;){var l=e[a];t>0&&n(l)?t>1?Lc(l,t-1,n,r,i):FS(i,l):r||(i[i.length]=l)}return i}function bue(e){var t=e==null?0:e.length;return t?Lc(e,1):[]}function vue(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}var nj=Math.max;function m6(e,t,n){return t=nj(t===void 0?e.length-1:t,0),function(){for(var r=arguments,i=-1,a=nj(r.length-t,0),o=Array(a);++i<a;)o[i]=r[t+i];i=-1;for(var l=Array(t+1);++i<t;)l[i]=r[i];return l[t]=n(o),vue(e,this,l)}}function _ue(e){return function(){return e}}function Xp(e){return e}var xue=hp?function(e,t){return hp(e,"toString",{configurable:!0,enumerable:!1,value:_ue(t),writable:!0})}:Xp,wue=800,Sue=16,Eue=Date.now;function kue(e){var t=0,n=0;return function(){var r=Eue(),i=Sue-(r-n);if(n=r,i>0){if(++t>=wue)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var g6=kue(xue);function y6(e){return g6(m6(e,void 0,bue),e+"")}var Aue=1,Tue=2,Cue=4,pp=y6(function(e,t){var n={};if(e==null)return n;var r=!1;t=Zp(t,function(a){return a=cl(a,e),r||(r=a.length>1),a}),fl(e,QS(e),n),r&&(n=Xu(n,Aue|Tue|Cue,gue));for(var i=t.length;i--;)p6(n,t[i]);return n});function eE(e,t){const n=t[e];return[pp(t,[e]),n]}function b6(e,t={},n=[]){const r=e||"";let i;if(r.startsWith("#"))i=decodeURIComponent(r.substring(1));else throw new Error(`Could not find a definition for ${e}.`);const a=Koe.get(t,i);if(a===void 0)throw new Error(`Could not find a definition for ${e}.`);const o=a[rn];if(o){if(n.includes(o)){if(n.length===1)throw new Error(`Definition for ${e} is a circular reference`);const[d,...h]=n,m=[...h,r,d].join(" -> ");throw new Error(`Definition for ${d} contains a circular reference through ${m}`)}const[l,c]=eE(rn,a),f=b6(c,t,[...n,r]);return Object.keys(l).length>0?{...l,...f}:f}return a}function v6(e,t={}){return b6(e,t,[])}var Oue=Object.prototype,Nue=Oue.hasOwnProperty;function Rue(e,t){return e!=null&&Nue.call(e,t)}function _6(e,t,n){t=cl(t,e);for(var r=-1,i=t.length,a=!1;++r<i;){var o=Ns(t[r]);if(!(a=e!=null&&n(e,o)))break;e=e[o]}return a||++r!=i?a:(i=e==null?0:e.length,!!i&&US(i)&&Hp(o,i)&&(an(e)||Jo(e)))}function An(e,t){return e!=null&&_6(e,t,Rue)}var jue="[object Number]";function x6(e){return typeof e=="number"||vr(e)&&qi(e)==jue}var Mue="[object String]";function Wp(e){return typeof e=="string"||!an(e)&&vr(e)&&qi(e)==Mue}function $ue(e,t,n,r){var i=-1,a=e==null?0:e.length;for(r&&a&&(n=e[++i]);++i<a;)n=t(n,e[i],i,e);return n}function Due(e){return function(t,n,r){for(var i=-1,a=Object(t),o=r(t),l=o.length;l--;){var c=o[++i];if(n(a[c],c,a)===!1)break}return t}}var w6=Due();function S6(e,t){return e&&w6(e,t,Yr)}function Iue(e,t){return function(n,r){if(n==null)return n;if(!ul(n))return e(n,r);for(var i=n.length,a=-1,o=Object(n);++a<i&&r(o[a],a,o)!==!1;);return n}}var E6=Iue(S6),Pue=1,Lue=2;function zue(e,t,n,r){var i=n.length,a=i;if(e==null)return!a;for(e=Object(e);i--;){var o=n[i];if(o[2]?o[1]!==e[o[0]]:!(o[0]in e))return!1}for(;++i<a;){o=n[i];var l=o[0],c=e[l],f=o[1];if(o[2]){if(c===void 0&&!(l in e))return!1}else{var d=new Dr,h;if(!(h===void 0?Yp(f,c,Pue|Lue,r,d):h))return!1}}return!0}function k6(e){return e===e&&!Mt(e)}function que(e){for(var t=Yr(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,k6(i)]}return t}function A6(e,t){return function(n){return n==null?!1:n[e]===t&&(t!==void 0||e in Object(n))}}function Fue(e){var t=que(e);return t.length==1&&t[0][2]?A6(t[0][0],t[0][1]):function(n){return n===e||zue(n,e,t)}}function Bue(e,t){return e!=null&&t in Object(e)}function T6(e,t){return e!=null&&_6(e,t,Bue)}var Uue=1,Vue=2;function Hue(e,t){return HS(e)&&k6(t)?A6(Ns(e),t):function(n){var r=Ne(n,e);return r===void 0&&r===t?T6(n,e):Yp(t,r,Uue|Vue)}}function Gue(e){return function(t){return t==null?void 0:t[e]}}function Yue(e){return function(t){return Kp(t,e)}}function Zue(e){return HS(e)?Gue(Ns(e)):Yue(e)}function tE(e){return typeof e=="function"?e:e==null?Xp:typeof e=="object"?an(e)?Hue(e[0],e[1]):Fue(e):Zue(e)}function Kue(e,t,n,r,i){return i(e,function(a,o,l){n=r?(r=!1,a):t(n,a,o,l)}),n}function Xue(e,t,n){var r=an(e)?$ue:Kue,i=arguments.length<3;return r(e,tE(t),n,i,E6)}function C6(e){return typeof e=="function"?e:Xp}var Wue=/\s/;function Que(e){for(var t=e.length;t--&&Wue.test(e.charAt(t)););return t}var Jue=/^\s+/;function ece(e){return e&&e.slice(0,Que(e)+1).replace(Jue,"")}var rj=NaN,tce=/^[-+]0x[0-9a-f]+$/i,nce=/^0b[01]+$/i,rce=/^0o[0-7]+$/i,ice=parseInt;function ace(e){if(typeof e=="number")return e;if(Ic(e))return rj;if(Mt(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Mt(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=ece(e);var n=nce.test(e);return n||rce.test(e)?ice(e.slice(2),n?2:8):tce.test(e)?rj:+e}var ij=1/0,sce=17976931348623157e292;function oce(e){if(!e)return e===0?e:0;if(e=ace(e),e===ij||e===-ij){var t=e<0?-1:1;return t*sce}return e===e?e:0}function lce(e){var t=oce(e),n=t%1;return t===t?n?t-n:t:0}var uce=9007199254740991,Cb=4294967295,cce=Math.min;function O6(e,t){if(e=lce(e),e<1||e>uce)return[];var n=Cb,r=cce(e,Cb);t=C6(t),e-=Cb;for(var i=WP(r,t);++n<e;)t(n);return i}function N6(e,t,n){var r;if(e&&n){const i=Ne(e,n);if(i===void 0)return;for(let a=0;a<t.length;a++){const o=t[a],l=Ne(o,[Bt,n],{});if(!(l.type==="object"||l.type==="array")&&(l.const===i||!((r=l.enum)===null||r===void 0)&&r.includes(i)))return a}}}function R6(e,t,n,r,i){if(t===void 0)return 0;const a=N6(t,n,i);if(x6(a))return a;for(let o=0;o<n.length;o++){const l=n[o];if(i&&An(l,[Bt,i])){const c=Ne(t,i),f=Ne(l,[Bt,i],{});if(e.isValid(f,c,r))return o}else if(l[Bt]){const c={anyOf:Object.keys(l[Bt]).map(d=>({required:[d]}))};let f;if(l.anyOf){const{...d}=l;d.allOf?d.allOf=d.allOf.slice():d.allOf=[],d.allOf.push(c),f=d}else f=Object.assign({},l,c);if(delete f.required,e.isValid(f,t,r))return o}else if(e.isValid(l,t,r))return o}return 0}function nE(e,t,n,r,i){return R6(e,t,n,r,i)}function rE(e,t,n,r){if(!Mt(e))return e;t=cl(t,e);for(var i=-1,a=t.length,o=a-1,l=e;l!=null&&++i<a;){var c=Ns(t[i]),f=n;if(c==="__proto__"||c==="constructor"||c==="prototype")return e;if(i!=o){var d=l[c];f=r?r(d,c,l):void 0,f===void 0&&(f=Mt(d)?d:Hp(t[i+1])?[]:{})}XS(l,c,f),l=l[c]}return e}function mn(e,t,n){return e==null?e:rE(e,t,n)}function fce(e,t,n){var r=an(e),i=r||ks(e)||Dc(e);if(t=tE(t),n==null){var a=e&&e.constructor;i?n=r?new a:[]:Mt(e)?n=Up(a)?u6(Fp(e)):{}:n={}}return(i?ZS:S6)(e,function(o,l,c){return t(n,o,l,c)}),n}function Hw(e,t,n){(n!==void 0&&!$c(e[t],n)||n===void 0&&!(t in e))&&KS(e,t,n)}function mp(e){return vr(e)&&ul(e)}function Gw(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}function dce(e){return fl(e,Pc(e))}function hce(e,t,n,r,i,a,o){var l=Gw(e,n),c=Gw(t,n),f=o.get(c);if(f){Hw(e,n,f);return}var d=a?a(l,c,n+"",e,t,o):void 0,h=d===void 0;if(h){var m=an(c),g=!m&&ks(c),v=!m&&!g&&Dc(c);d=c,m||g||v?an(l)?d=l:mp(l)?d=WS(l):g?(h=!1,d=s6(c,!0)):v?(h=!1,d=l6(c,!0)):d=[]:Ss(c)||Jo(c)?(d=l,Jo(l)?d=dce(l):(!Mt(l)||Up(l))&&(d=c6(c))):h=!1}h&&(o.set(c,d),i(d,c,r,a,o),o.delete(c)),Hw(e,n,d)}function j6(e,t,n,r,i){e!==t&&w6(t,function(a,o){if(i||(i=new Dr),Mt(a))hce(e,t,o,n,j6,r,i);else{var l=r?r(Gw(e,o),a,o+"",e,t,i):void 0;l===void 0&&(l=a),Hw(e,o,l)}},Pc)}function iE(e,t){return g6(m6(e,t,Xp),e+"")}function pce(e,t,n){if(!Mt(n))return!1;var r=typeof t;return(r=="number"?ul(n)&&Hp(t,n.length):r=="string"&&t in n)?$c(n[t],e):!1}function mce(e){return iE(function(t,n){var r=-1,i=n.length,a=i>1?n[i-1]:void 0,o=i>2?n[2]:void 0;for(a=e.length>3&&typeof a=="function"?(i--,a):void 0,o&&pce(n[0],n[1],o)&&(a=i<3?void 0:a,i=1),t=Object(t);++r<i;){var l=n[r];l&&e(t,l,r,a)}return t})}var gce=mce(function(e,t,n){j6(e,t,n)}),yce=1/0;function bce(e){var t=e==null?0:e.length;return t?Lc(e,yce):[]}function vce(e,t,n,r){for(var i=e.length,a=n+-1;++a<i;)if(t(e[a],a,e))return a;return-1}function _ce(e){return e!==e}function xce(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}function wce(e,t,n){return t===t?xce(e,t,n):vce(e,_ce,n)}function M6(e,t){var n=e==null?0:e.length;return!!n&&wce(e,t,0)>-1}function Sce(){}var Ece=1/0,kce=zo&&1/qS(new zo([,-0]))[1]==Ece?function(e){return new zo(e)}:Sce,Ace=200;function $6(e,t,n){var r=-1,i=M6,a=e.length,o=!0,l=[],c=l;if(a>=Ace){var f=kce(e);if(f)return qS(f);o=!1,i=zS,c=new Qo}else c=l;e:for(;++r<a;){var d=e[r],h=d;if(d=d!==0?d:0,o&&h===h){for(var m=c.length;m--;)if(c[m]===h)continue e;l.push(d)}else i(c,h,n)||(c!==l&&c.push(h),l.push(d))}return l}function Tce(e){return e&&e.length?$6(e):[]}var Ob,aj;function Cce(){if(aj)return Ob;aj=1;function e(){this.__data__=[],this.size=0}return Ob=e,Ob}var Nb,sj;function dl(){if(sj)return Nb;sj=1;function e(t,n){return t===n||t!==t&&n!==n}return Nb=e,Nb}var Rb,oj;function Qp(){if(oj)return Rb;oj=1;var e=dl();function t(n,r){for(var i=n.length;i--;)if(e(n[i][0],r))return i;return-1}return Rb=t,Rb}var jb,lj;function Oce(){if(lj)return jb;lj=1;var e=Qp(),t=Array.prototype,n=t.splice;function r(i){var a=this.__data__,o=e(a,i);if(o<0)return!1;var l=a.length-1;return o==l?a.pop():n.call(a,o,1),--this.size,!0}return jb=r,jb}var Mb,uj;function Nce(){if(uj)return Mb;uj=1;var e=Qp();function t(n){var r=this.__data__,i=e(r,n);return i<0?void 0:r[i][1]}return Mb=t,Mb}var $b,cj;function Rce(){if(cj)return $b;cj=1;var e=Qp();function t(n){return e(this.__data__,n)>-1}return $b=t,$b}var Db,fj;function jce(){if(fj)return Db;fj=1;var e=Qp();function t(n,r){var i=this.__data__,a=e(i,n);return a<0?(++this.size,i.push([n,r])):i[a][1]=r,this}return Db=t,Db}var Ib,dj;function Jp(){if(dj)return Ib;dj=1;var e=Cce(),t=Oce(),n=Nce(),r=Rce(),i=jce();function a(o){var l=-1,c=o==null?0:o.length;for(this.clear();++l<c;){var f=o[l];this.set(f[0],f[1])}}return a.prototype.clear=e,a.prototype.delete=t,a.prototype.get=n,a.prototype.has=r,a.prototype.set=i,Ib=a,Ib}var Pb,hj;function Mce(){if(hj)return Pb;hj=1;var e=Jp();function t(){this.__data__=new e,this.size=0}return Pb=t,Pb}var Lb,pj;function $ce(){if(pj)return Lb;pj=1;function e(t){var n=this.__data__,r=n.delete(t);return this.size=n.size,r}return Lb=e,Lb}var zb,mj;function Dce(){if(mj)return zb;mj=1;function e(t){return this.__data__.get(t)}return zb=e,zb}var qb,gj;function Ice(){if(gj)return qb;gj=1;function e(t){return this.__data__.has(t)}return qb=e,qb}var Fb,yj;function D6(){if(yj)return Fb;yj=1;var e=typeof fd=="object"&&fd&&fd.Object===Object&&fd;return Fb=e,Fb}var Bb,bj;function ri(){if(bj)return Bb;bj=1;var e=D6(),t=typeof self=="object"&&self&&self.Object===Object&&self,n=e||t||Function("return this")();return Bb=n,Bb}var Ub,vj;function hl(){if(vj)return Ub;vj=1;var e=ri(),t=e.Symbol;return Ub=t,Ub}var Vb,_j;function Pce(){if(_j)return Vb;_j=1;var e=hl(),t=Object.prototype,n=t.hasOwnProperty,r=t.toString,i=e?e.toStringTag:void 0;function a(o){var l=n.call(o,i),c=o[i];try{o[i]=void 0;var f=!0}catch{}var d=r.call(o);return f&&(l?o[i]=c:delete o[i]),d}return Vb=a,Vb}var Hb,xj;function Lce(){if(xj)return Hb;xj=1;var e=Object.prototype,t=e.toString;function n(r){return t.call(r)}return Hb=n,Hb}var Gb,wj;function Rs(){if(wj)return Gb;wj=1;var e=hl(),t=Pce(),n=Lce(),r="[object Null]",i="[object Undefined]",a=e?e.toStringTag:void 0;function o(l){return l==null?l===void 0?i:r:a&&a in Object(l)?t(l):n(l)}return Gb=o,Gb}var Yb,Sj;function ii(){if(Sj)return Yb;Sj=1;function e(t){var n=typeof t;return t!=null&&(n=="object"||n=="function")}return Yb=e,Yb}var Zb,Ej;function aE(){if(Ej)return Zb;Ej=1;var e=Rs(),t=ii(),n="[object AsyncFunction]",r="[object Function]",i="[object GeneratorFunction]",a="[object Proxy]";function o(l){if(!t(l))return!1;var c=e(l);return c==r||c==i||c==n||c==a}return Zb=o,Zb}var Kb,kj;function zce(){if(kj)return Kb;kj=1;var e=ri(),t=e["__core-js_shared__"];return Kb=t,Kb}var Xb,Aj;function qce(){if(Aj)return Xb;Aj=1;var e=zce(),t=function(){var r=/[^.]+$/.exec(e&&e.keys&&e.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""}();function n(r){return!!t&&t in r}return Xb=n,Xb}var Wb,Tj;function I6(){if(Tj)return Wb;Tj=1;var e=Function.prototype,t=e.toString;function n(r){if(r!=null){try{return t.call(r)}catch{}try{return r+""}catch{}}return""}return Wb=n,Wb}var Qb,Cj;function Fce(){if(Cj)return Qb;Cj=1;var e=aE(),t=qce(),n=ii(),r=I6(),i=/[\\^$.*+?()[\]{}|]/g,a=/^\[object .+?Constructor\]$/,o=Function.prototype,l=Object.prototype,c=o.toString,f=l.hasOwnProperty,d=RegExp("^"+c.call(f).replace(i,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function h(m){if(!n(m)||t(m))return!1;var g=e(m)?d:a;return g.test(r(m))}return Qb=h,Qb}var Jb,Oj;function Bce(){if(Oj)return Jb;Oj=1;function e(t,n){return t==null?void 0:t[n]}return Jb=e,Jb}var ev,Nj;function js(){if(Nj)return ev;Nj=1;var e=Fce(),t=Bce();function n(r,i){var a=t(r,i);return e(a)?a:void 0}return ev=n,ev}var tv,Rj;function sE(){if(Rj)return tv;Rj=1;var e=js(),t=ri(),n=e(t,"Map");return tv=n,tv}var nv,jj;function em(){if(jj)return nv;jj=1;var e=js(),t=e(Object,"create");return nv=t,nv}var rv,Mj;function Uce(){if(Mj)return rv;Mj=1;var e=em();function t(){this.__data__=e?e(null):{},this.size=0}return rv=t,rv}var iv,$j;function Vce(){if($j)return iv;$j=1;function e(t){var n=this.has(t)&&delete this.__data__[t];return this.size-=n?1:0,n}return iv=e,iv}var av,Dj;function Hce(){if(Dj)return av;Dj=1;var e=em(),t="__lodash_hash_undefined__",n=Object.prototype,r=n.hasOwnProperty;function i(a){var o=this.__data__;if(e){var l=o[a];return l===t?void 0:l}return r.call(o,a)?o[a]:void 0}return av=i,av}var sv,Ij;function Gce(){if(Ij)return sv;Ij=1;var e=em(),t=Object.prototype,n=t.hasOwnProperty;function r(i){var a=this.__data__;return e?a[i]!==void 0:n.call(a,i)}return sv=r,sv}var ov,Pj;function Yce(){if(Pj)return ov;Pj=1;var e=em(),t="__lodash_hash_undefined__";function n(r,i){var a=this.__data__;return this.size+=this.has(r)?0:1,a[r]=e&&i===void 0?t:i,this}return ov=n,ov}var lv,Lj;function Zce(){if(Lj)return lv;Lj=1;var e=Uce(),t=Vce(),n=Hce(),r=Gce(),i=Yce();function a(o){var l=-1,c=o==null?0:o.length;for(this.clear();++l<c;){var f=o[l];this.set(f[0],f[1])}}return a.prototype.clear=e,a.prototype.delete=t,a.prototype.get=n,a.prototype.has=r,a.prototype.set=i,lv=a,lv}var uv,zj;function Kce(){if(zj)return uv;zj=1;var e=Zce(),t=Jp(),n=sE();function r(){this.size=0,this.__data__={hash:new e,map:new(n||t),string:new e}}return uv=r,uv}var cv,qj;function Xce(){if(qj)return cv;qj=1;function e(t){var n=typeof t;return n=="string"||n=="number"||n=="symbol"||n=="boolean"?t!=="__proto__":t===null}return cv=e,cv}var fv,Fj;function tm(){if(Fj)return fv;Fj=1;var e=Xce();function t(n,r){var i=n.__data__;return e(r)?i[typeof r=="string"?"string":"hash"]:i.map}return fv=t,fv}var dv,Bj;function Wce(){if(Bj)return dv;Bj=1;var e=tm();function t(n){var r=e(this,n).delete(n);return this.size-=r?1:0,r}return dv=t,dv}var hv,Uj;function Qce(){if(Uj)return hv;Uj=1;var e=tm();function t(n){return e(this,n).get(n)}return hv=t,hv}var pv,Vj;function Jce(){if(Vj)return pv;Vj=1;var e=tm();function t(n){return e(this,n).has(n)}return pv=t,pv}var mv,Hj;function efe(){if(Hj)return mv;Hj=1;var e=tm();function t(n,r){var i=e(this,n),a=i.size;return i.set(n,r),this.size+=i.size==a?0:1,this}return mv=t,mv}var gv,Gj;function oE(){if(Gj)return gv;Gj=1;var e=Kce(),t=Wce(),n=Qce(),r=Jce(),i=efe();function a(o){var l=-1,c=o==null?0:o.length;for(this.clear();++l<c;){var f=o[l];this.set(f[0],f[1])}}return a.prototype.clear=e,a.prototype.delete=t,a.prototype.get=n,a.prototype.has=r,a.prototype.set=i,gv=a,gv}var yv,Yj;function tfe(){if(Yj)return yv;Yj=1;var e=Jp(),t=sE(),n=oE(),r=200;function i(a,o){var l=this.__data__;if(l instanceof e){var c=l.__data__;if(!t||c.length<r-1)return c.push([a,o]),this.size=++l.size,this;l=this.__data__=new n(c)}return l.set(a,o),this.size=l.size,this}return yv=i,yv}var bv,Zj;function nm(){if(Zj)return bv;Zj=1;var e=Jp(),t=Mce(),n=$ce(),r=Dce(),i=Ice(),a=tfe();function o(l){var c=this.__data__=new e(l);this.size=c.size}return o.prototype.clear=t,o.prototype.delete=n,o.prototype.get=r,o.prototype.has=i,o.prototype.set=a,bv=o,bv}var vv,Kj;function P6(){if(Kj)return vv;Kj=1;function e(t,n){for(var r=-1,i=t==null?0:t.length;++r<i&&n(t[r],r,t)!==!1;);return t}return vv=e,vv}var _v,Xj;function L6(){if(Xj)return _v;Xj=1;var e=js(),t=function(){try{var n=e(Object,"defineProperty");return n({},"",{}),n}catch{}}();return _v=t,_v}var xv,Wj;function lE(){if(Wj)return xv;Wj=1;var e=L6();function t(n,r,i){r=="__proto__"&&e?e(n,r,{configurable:!0,enumerable:!0,value:i,writable:!0}):n[r]=i}return xv=t,xv}var wv,Qj;function z6(){if(Qj)return wv;Qj=1;var e=lE(),t=dl(),n=Object.prototype,r=n.hasOwnProperty;function i(a,o,l){var c=a[o];(!(r.call(a,o)&&t(c,l))||l===void 0&&!(o in a))&&e(a,o,l)}return wv=i,wv}var Sv,Jj;function zc(){if(Jj)return Sv;Jj=1;var e=z6(),t=lE();function n(r,i,a,o){var l=!a;a||(a={});for(var c=-1,f=i.length;++c<f;){var d=i[c],h=o?o(a[d],r[d],d,a,r):void 0;h===void 0&&(h=r[d]),l?t(a,d,h):e(a,d,h)}return a}return Sv=n,Sv}var Ev,eM;function nfe(){if(eM)return Ev;eM=1;function e(t,n){for(var r=-1,i=Array(t);++r<t;)i[r]=n(r);return i}return Ev=e,Ev}var kv,tM;function ai(){if(tM)return kv;tM=1;function e(t){return t!=null&&typeof t=="object"}return kv=e,kv}var Av,nM;function rfe(){if(nM)return Av;nM=1;var e=Rs(),t=ai(),n="[object Arguments]";function r(i){return t(i)&&e(i)==n}return Av=r,Av}var Tv,rM;function rm(){if(rM)return Tv;rM=1;var e=rfe(),t=ai(),n=Object.prototype,r=n.hasOwnProperty,i=n.propertyIsEnumerable,a=e(function(){return arguments}())?e:function(o){return t(o)&&r.call(o,"callee")&&!i.call(o,"callee")};return Tv=a,Tv}var Cv,iM;function lr(){if(iM)return Cv;iM=1;var e=Array.isArray;return Cv=e,Cv}var qu={exports:{}},Ov,aM;function ife(){if(aM)return Ov;aM=1;function e(){return!1}return Ov=e,Ov}qu.exports;var sM;function im(){return sM||(sM=1,function(e,t){var n=ri(),r=ife(),i=t&&!t.nodeType&&t,a=i&&!0&&e&&!e.nodeType&&e,o=a&&a.exports===i,l=o?n.Buffer:void 0,c=l?l.isBuffer:void 0,f=c||r;e.exports=f}(qu,qu.exports)),qu.exports}var Nv,oM;function uE(){if(oM)return Nv;oM=1;var e=9007199254740991,t=/^(?:0|[1-9]\d*)$/;function n(r,i){var a=typeof r;return i=i??e,!!i&&(a=="number"||a!="symbol"&&t.test(r))&&r>-1&&r%1==0&&r<i}return Nv=n,Nv}var Rv,lM;function cE(){if(lM)return Rv;lM=1;var e=9007199254740991;function t(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=e}return Rv=t,Rv}var jv,uM;function afe(){if(uM)return jv;uM=1;var e=Rs(),t=cE(),n=ai(),r="[object Arguments]",i="[object Array]",a="[object Boolean]",o="[object Date]",l="[object Error]",c="[object Function]",f="[object Map]",d="[object Number]",h="[object Object]",m="[object RegExp]",g="[object Set]",v="[object String]",w="[object WeakMap]",b="[object ArrayBuffer]",_="[object DataView]",S="[object Float32Array]",x="[object Float64Array]",A="[object Int8Array]",k="[object Int16Array]",T="[object Int32Array]",O="[object Uint8Array]",$="[object Uint8ClampedArray]",L="[object Uint16Array]",M="[object Uint32Array]",z={};z[S]=z[x]=z[A]=z[k]=z[T]=z[O]=z[$]=z[L]=z[M]=!0,z[r]=z[i]=z[b]=z[a]=z[_]=z[o]=z[l]=z[c]=z[f]=z[d]=z[h]=z[m]=z[g]=z[v]=z[w]=!1;function P(q){return n(q)&&t(q.length)&&!!z[e(q)]}return jv=P,jv}var Mv,cM;function Ms(){if(cM)return Mv;cM=1;function e(t){return function(n){return t(n)}}return Mv=e,Mv}var Fu={exports:{}};Fu.exports;var fM;function fE(){return fM||(fM=1,function(e,t){var n=D6(),r=t&&!t.nodeType&&t,i=r&&!0&&e&&!e.nodeType&&e,a=i&&i.exports===r,o=a&&n.process,l=function(){try{var c=i&&i.require&&i.require("util").types;return c||o&&o.binding&&o.binding("util")}catch{}}();e.exports=l}(Fu,Fu.exports)),Fu.exports}var $v,dM;function dE(){if(dM)return $v;dM=1;var e=afe(),t=Ms(),n=fE(),r=n&&n.isTypedArray,i=r?t(r):e;return $v=i,$v}var Dv,hM;function q6(){if(hM)return Dv;hM=1;var e=nfe(),t=rm(),n=lr(),r=im(),i=uE(),a=dE(),o=Object.prototype,l=o.hasOwnProperty;function c(f,d){var h=n(f),m=!h&&t(f),g=!h&&!m&&r(f),v=!h&&!m&&!g&&a(f),w=h||m||g||v,b=w?e(f.length,String):[],_=b.length;for(var S in f)(d||l.call(f,S))&&!(w&&(S=="length"||g&&(S=="offset"||S=="parent")||v&&(S=="buffer"||S=="byteLength"||S=="byteOffset")||i(S,_)))&&b.push(S);return b}return Dv=c,Dv}var Iv,pM;function hE(){if(pM)return Iv;pM=1;var e=Object.prototype;function t(n){var r=n&&n.constructor,i=typeof r=="function"&&r.prototype||e;return n===i}return Iv=t,Iv}var Pv,mM;function F6(){if(mM)return Pv;mM=1;function e(t,n){return function(r){return t(n(r))}}return Pv=e,Pv}var Lv,gM;function sfe(){if(gM)return Lv;gM=1;var e=F6(),t=e(Object.keys,Object);return Lv=t,Lv}var zv,yM;function ofe(){if(yM)return zv;yM=1;var e=hE(),t=sfe(),n=Object.prototype,r=n.hasOwnProperty;function i(a){if(!e(a))return t(a);var o=[];for(var l in Object(a))r.call(a,l)&&l!="constructor"&&o.push(l);return o}return zv=i,zv}var qv,bM;function pl(){if(bM)return qv;bM=1;var e=aE(),t=cE();function n(r){return r!=null&&t(r.length)&&!e(r)}return qv=n,qv}var Fv,vM;function qc(){if(vM)return Fv;vM=1;var e=q6(),t=ofe(),n=pl();function r(i){return n(i)?e(i):t(i)}return Fv=r,Fv}var Bv,_M;function lfe(){if(_M)return Bv;_M=1;var e=zc(),t=qc();function n(r,i){return r&&e(i,t(i),r)}return Bv=n,Bv}var Uv,xM;function ufe(){if(xM)return Uv;xM=1;function e(t){var n=[];if(t!=null)for(var r in Object(t))n.push(r);return n}return Uv=e,Uv}var Vv,wM;function cfe(){if(wM)return Vv;wM=1;var e=ii(),t=hE(),n=ufe(),r=Object.prototype,i=r.hasOwnProperty;function a(o){if(!e(o))return n(o);var l=t(o),c=[];for(var f in o)f=="constructor"&&(l||!i.call(o,f))||c.push(f);return c}return Vv=a,Vv}var Hv,SM;function ml(){if(SM)return Hv;SM=1;var e=q6(),t=cfe(),n=pl();function r(i){return n(i)?e(i,!0):t(i)}return Hv=r,Hv}var Gv,EM;function ffe(){if(EM)return Gv;EM=1;var e=zc(),t=ml();function n(r,i){return r&&e(i,t(i),r)}return Gv=n,Gv}var Bu={exports:{}};Bu.exports;var kM;function B6(){return kM||(kM=1,function(e,t){var n=ri(),r=t&&!t.nodeType&&t,i=r&&!0&&e&&!e.nodeType&&e,a=i&&i.exports===r,o=a?n.Buffer:void 0,l=o?o.allocUnsafe:void 0;function c(f,d){if(d)return f.slice();var h=f.length,m=l?l(h):new f.constructor(h);return f.copy(m),m}e.exports=c}(Bu,Bu.exports)),Bu.exports}var Yv,AM;function pE(){if(AM)return Yv;AM=1;function e(t,n){var r=-1,i=t.length;for(n||(n=Array(i));++r<i;)n[r]=t[r];return n}return Yv=e,Yv}var Zv,TM;function dfe(){if(TM)return Zv;TM=1;function e(t,n){for(var r=-1,i=t==null?0:t.length,a=0,o=[];++r<i;){var l=t[r];n(l,r,t)&&(o[a++]=l)}return o}return Zv=e,Zv}var Kv,CM;function U6(){if(CM)return Kv;CM=1;function e(){return[]}return Kv=e,Kv}var Xv,OM;function mE(){if(OM)return Xv;OM=1;var e=dfe(),t=U6(),n=Object.prototype,r=n.propertyIsEnumerable,i=Object.getOwnPropertySymbols,a=i?function(o){return o==null?[]:(o=Object(o),e(i(o),function(l){return r.call(o,l)}))}:t;return Xv=a,Xv}var Wv,NM;function hfe(){if(NM)return Wv;NM=1;var e=zc(),t=mE();function n(r,i){return e(r,t(r),i)}return Wv=n,Wv}var Qv,RM;function gE(){if(RM)return Qv;RM=1;function e(t,n){for(var r=-1,i=n.length,a=t.length;++r<i;)t[a+r]=n[r];return t}return Qv=e,Qv}var Jv,jM;function yE(){if(jM)return Jv;jM=1;var e=F6(),t=e(Object.getPrototypeOf,Object);return Jv=t,Jv}var e1,MM;function V6(){if(MM)return e1;MM=1;var e=gE(),t=yE(),n=mE(),r=U6(),i=Object.getOwnPropertySymbols,a=i?function(o){for(var l=[];o;)e(l,n(o)),o=t(o);return l}:r;return e1=a,e1}var t1,$M;function pfe(){if($M)return t1;$M=1;var e=zc(),t=V6();function n(r,i){return e(r,t(r),i)}return t1=n,t1}var n1,DM;function H6(){if(DM)return n1;DM=1;var e=gE(),t=lr();function n(r,i,a){var o=i(r);return t(r)?o:e(o,a(r))}return n1=n,n1}var r1,IM;function G6(){if(IM)return r1;IM=1;var e=H6(),t=mE(),n=qc();function r(i){return e(i,n,t)}return r1=r,r1}var i1,PM;function mfe(){if(PM)return i1;PM=1;var e=H6(),t=V6(),n=ml();function r(i){return e(i,n,t)}return i1=r,i1}var a1,LM;function gfe(){if(LM)return a1;LM=1;var e=js(),t=ri(),n=e(t,"DataView");return a1=n,a1}var s1,zM;function yfe(){if(zM)return s1;zM=1;var e=js(),t=ri(),n=e(t,"Promise");return s1=n,s1}var o1,qM;function Y6(){if(qM)return o1;qM=1;var e=js(),t=ri(),n=e(t,"Set");return o1=n,o1}var l1,FM;function bfe(){if(FM)return l1;FM=1;var e=js(),t=ri(),n=e(t,"WeakMap");return l1=n,l1}var u1,BM;function am(){if(BM)return u1;BM=1;var e=gfe(),t=sE(),n=yfe(),r=Y6(),i=bfe(),a=Rs(),o=I6(),l="[object Map]",c="[object Object]",f="[object Promise]",d="[object Set]",h="[object WeakMap]",m="[object DataView]",g=o(e),v=o(t),w=o(n),b=o(r),_=o(i),S=a;return(e&&S(new e(new ArrayBuffer(1)))!=m||t&&S(new t)!=l||n&&S(n.resolve())!=f||r&&S(new r)!=d||i&&S(new i)!=h)&&(S=function(x){var A=a(x),k=A==c?x.constructor:void 0,T=k?o(k):"";if(T)switch(T){case g:return m;case v:return l;case w:return f;case b:return d;case _:return h}return A}),u1=S,u1}var c1,UM;function vfe(){if(UM)return c1;UM=1;var e=Object.prototype,t=e.hasOwnProperty;function n(r){var i=r.length,a=new r.constructor(i);return i&&typeof r[0]=="string"&&t.call(r,"index")&&(a.index=r.index,a.input=r.input),a}return c1=n,c1}var f1,VM;function Z6(){if(VM)return f1;VM=1;var e=ri(),t=e.Uint8Array;return f1=t,f1}var d1,HM;function bE(){if(HM)return d1;HM=1;var e=Z6();function t(n){var r=new n.constructor(n.byteLength);return new e(r).set(new e(n)),r}return d1=t,d1}var h1,GM;function _fe(){if(GM)return h1;GM=1;var e=bE();function t(n,r){var i=r?e(n.buffer):n.buffer;return new n.constructor(i,n.byteOffset,n.byteLength)}return h1=t,h1}var p1,YM;function xfe(){if(YM)return p1;YM=1;var e=/\w*$/;function t(n){var r=new n.constructor(n.source,e.exec(n));return r.lastIndex=n.lastIndex,r}return p1=t,p1}var m1,ZM;function wfe(){if(ZM)return m1;ZM=1;var e=hl(),t=e?e.prototype:void 0,n=t?t.valueOf:void 0;function r(i){return n?Object(n.call(i)):{}}return m1=r,m1}var g1,KM;function K6(){if(KM)return g1;KM=1;var e=bE();function t(n,r){var i=r?e(n.buffer):n.buffer;return new n.constructor(i,n.byteOffset,n.length)}return g1=t,g1}var y1,XM;function Sfe(){if(XM)return y1;XM=1;var e=bE(),t=_fe(),n=xfe(),r=wfe(),i=K6(),a="[object Boolean]",o="[object Date]",l="[object Map]",c="[object Number]",f="[object RegExp]",d="[object Set]",h="[object String]",m="[object Symbol]",g="[object ArrayBuffer]",v="[object DataView]",w="[object Float32Array]",b="[object Float64Array]",_="[object Int8Array]",S="[object Int16Array]",x="[object Int32Array]",A="[object Uint8Array]",k="[object Uint8ClampedArray]",T="[object Uint16Array]",O="[object Uint32Array]";function $(L,M,z){var P=L.constructor;switch(M){case g:return e(L);case a:case o:return new P(+L);case v:return t(L,z);case w:case b:case _:case S:case x:case A:case k:case T:case O:return i(L,z);case l:return new P;case c:case h:return new P(L);case f:return n(L);case d:return new P;case m:return r(L)}}return y1=$,y1}var b1,WM;function Efe(){if(WM)return b1;WM=1;var e=ii(),t=Object.create,n=function(){function r(){}return function(i){if(!e(i))return{};if(t)return t(i);r.prototype=i;var a=new r;return r.prototype=void 0,a}}();return b1=n,b1}var v1,QM;function X6(){if(QM)return v1;QM=1;var e=Efe(),t=yE(),n=hE();function r(i){return typeof i.constructor=="function"&&!n(i)?e(t(i)):{}}return v1=r,v1}var _1,JM;function kfe(){if(JM)return _1;JM=1;var e=am(),t=ai(),n="[object Map]";function r(i){return t(i)&&e(i)==n}return _1=r,_1}var x1,e$;function Afe(){if(e$)return x1;e$=1;var e=kfe(),t=Ms(),n=fE(),r=n&&n.isMap,i=r?t(r):e;return x1=i,x1}var w1,t$;function Tfe(){if(t$)return w1;t$=1;var e=am(),t=ai(),n="[object Set]";function r(i){return t(i)&&e(i)==n}return w1=r,w1}var S1,n$;function Cfe(){if(n$)return S1;n$=1;var e=Tfe(),t=Ms(),n=fE(),r=n&&n.isSet,i=r?t(r):e;return S1=i,S1}var E1,r$;function Ofe(){if(r$)return E1;r$=1;var e=nm(),t=P6(),n=z6(),r=lfe(),i=ffe(),a=B6(),o=pE(),l=hfe(),c=pfe(),f=G6(),d=mfe(),h=am(),m=vfe(),g=Sfe(),v=X6(),w=lr(),b=im(),_=Afe(),S=ii(),x=Cfe(),A=qc(),k=ml(),T=1,O=2,$=4,L="[object Arguments]",M="[object Array]",z="[object Boolean]",P="[object Date]",q="[object Error]",D="[object Function]",H="[object GeneratorFunction]",B="[object Map]",G="[object Number]",K="[object Object]",Q="[object RegExp]",R="[object Set]",V="[object String]",X="[object Symbol]",j="[object WeakMap]",I="[object ArrayBuffer]",U="[object DataView]",Y="[object Float32Array]",ne="[object Float64Array]",ae="[object Int8Array]",re="[object Int16Array]",le="[object Int32Array]",W="[object Uint8Array]",J="[object Uint8ClampedArray]",se="[object Uint16Array]",fe="[object Uint32Array]",me={};me[L]=me[M]=me[I]=me[U]=me[z]=me[P]=me[Y]=me[ne]=me[ae]=me[re]=me[le]=me[B]=me[G]=me[K]=me[Q]=me[R]=me[V]=me[X]=me[W]=me[J]=me[se]=me[fe]=!0,me[q]=me[D]=me[j]=!1;function xe(we,Ve,qe,We,He,$e){var Be,Ot=Ve&T,kt=Ve&O,pe=Ve&$;if(qe&&(Be=He?qe(we,We,He,$e):qe(we)),Be!==void 0)return Be;if(!S(we))return we;var _e=w(we);if(_e){if(Be=m(we),!Ot)return o(we,Be)}else{var Te=h(we),je=Te==D||Te==H;if(b(we))return a(we,Ot);if(Te==K||Te==L||je&&!He){if(Be=kt||je?{}:v(we),!Ot)return kt?c(we,i(Be,we)):l(we,r(Be,we))}else{if(!me[Te])return He?we:{};Be=g(we,Te,Ot)}}$e||($e=new e);var rt=$e.get(we);if(rt)return rt;$e.set(we,Be),x(we)?we.forEach(function($t){Be.add(xe($t,Ve,qe,$t,we,$e))}):_(we)&&we.forEach(function($t,Gt){Be.set(Gt,xe($t,Ve,qe,Gt,we,$e))});var cn=pe?kt?d:f:kt?k:A,Cn=_e?void 0:cn(we);return t(Cn||we,function($t,Gt){Cn&&(Gt=$t,$t=we[Gt]),n(Be,Gt,xe($t,Ve,qe,Gt,we,$e))}),Be}return E1=xe,E1}var k1,i$;function Nfe(){if(i$)return k1;i$=1;var e=Ofe(),t=1,n=4;function r(i){return e(i,t|n)}return k1=r,k1}var A1,a$;function Rfe(){if(a$)return A1;a$=1;var e="__lodash_hash_undefined__";function t(n){return this.__data__.set(n,e),this}return A1=t,A1}var T1,s$;function jfe(){if(s$)return T1;s$=1;function e(t){return this.__data__.has(t)}return T1=e,T1}var C1,o$;function sm(){if(o$)return C1;o$=1;var e=oE(),t=Rfe(),n=jfe();function r(i){var a=-1,o=i==null?0:i.length;for(this.__data__=new e;++a<o;)this.add(i[a])}return r.prototype.add=r.prototype.push=t,r.prototype.has=n,C1=r,C1}var O1,l$;function Mfe(){if(l$)return O1;l$=1;function e(t,n){for(var r=-1,i=t==null?0:t.length;++r<i;)if(n(t[r],r,t))return!0;return!1}return O1=e,O1}var N1,u$;function om(){if(u$)return N1;u$=1;function e(t,n){return t.has(n)}return N1=e,N1}var R1,c$;function W6(){if(c$)return R1;c$=1;var e=sm(),t=Mfe(),n=om(),r=1,i=2;function a(o,l,c,f,d,h){var m=c&r,g=o.length,v=l.length;if(g!=v&&!(m&&v>g))return!1;var w=h.get(o),b=h.get(l);if(w&&b)return w==l&&b==o;var _=-1,S=!0,x=c&i?new e:void 0;for(h.set(o,l),h.set(l,o);++_<g;){var A=o[_],k=l[_];if(f)var T=m?f(k,A,_,l,o,h):f(A,k,_,o,l,h);if(T!==void 0){if(T)continue;S=!1;break}if(x){if(!t(l,function(O,$){if(!n(x,$)&&(A===O||d(A,O,c,f,h)))return x.push($)})){S=!1;break}}else if(!(A===k||d(A,k,c,f,h))){S=!1;break}}return h.delete(o),h.delete(l),S}return R1=a,R1}var j1,f$;function $fe(){if(f$)return j1;f$=1;function e(t){var n=-1,r=Array(t.size);return t.forEach(function(i,a){r[++n]=[a,i]}),r}return j1=e,j1}var M1,d$;function vE(){if(d$)return M1;d$=1;function e(t){var n=-1,r=Array(t.size);return t.forEach(function(i){r[++n]=i}),r}return M1=e,M1}var $1,h$;function Dfe(){if(h$)return $1;h$=1;var e=hl(),t=Z6(),n=dl(),r=W6(),i=$fe(),a=vE(),o=1,l=2,c="[object Boolean]",f="[object Date]",d="[object Error]",h="[object Map]",m="[object Number]",g="[object RegExp]",v="[object Set]",w="[object String]",b="[object Symbol]",_="[object ArrayBuffer]",S="[object DataView]",x=e?e.prototype:void 0,A=x?x.valueOf:void 0;function k(T,O,$,L,M,z,P){switch($){case S:if(T.byteLength!=O.byteLength||T.byteOffset!=O.byteOffset)return!1;T=T.buffer,O=O.buffer;case _:return!(T.byteLength!=O.byteLength||!z(new t(T),new t(O)));case c:case f:case m:return n(+T,+O);case d:return T.name==O.name&&T.message==O.message;case g:case w:return T==O+"";case h:var q=i;case v:var D=L&o;if(q||(q=a),T.size!=O.size&&!D)return!1;var H=P.get(T);if(H)return H==O;L|=l,P.set(T,O);var B=r(q(T),q(O),L,M,z,P);return P.delete(T),B;case b:if(A)return A.call(T)==A.call(O)}return!1}return $1=k,$1}var D1,p$;function Ife(){if(p$)return D1;p$=1;var e=G6(),t=1,n=Object.prototype,r=n.hasOwnProperty;function i(a,o,l,c,f,d){var h=l&t,m=e(a),g=m.length,v=e(o),w=v.length;if(g!=w&&!h)return!1;for(var b=g;b--;){var _=m[b];if(!(h?_ in o:r.call(o,_)))return!1}var S=d.get(a),x=d.get(o);if(S&&x)return S==o&&x==a;var A=!0;d.set(a,o),d.set(o,a);for(var k=h;++b<g;){_=m[b];var T=a[_],O=o[_];if(c)var $=h?c(O,T,_,o,a,d):c(T,O,_,a,o,d);if(!($===void 0?T===O||f(T,O,l,c,d):$)){A=!1;break}k||(k=_=="constructor")}if(A&&!k){var L=a.constructor,M=o.constructor;L!=M&&"constructor"in a&&"constructor"in o&&!(typeof L=="function"&&L instanceof L&&typeof M=="function"&&M instanceof M)&&(A=!1)}return d.delete(a),d.delete(o),A}return D1=i,D1}var I1,m$;function Pfe(){if(m$)return I1;m$=1;var e=nm(),t=W6(),n=Dfe(),r=Ife(),i=am(),a=lr(),o=im(),l=dE(),c=1,f="[object Arguments]",d="[object Array]",h="[object Object]",m=Object.prototype,g=m.hasOwnProperty;function v(w,b,_,S,x,A){var k=a(w),T=a(b),O=k?d:i(w),$=T?d:i(b);O=O==f?h:O,$=$==f?h:$;var L=O==h,M=$==h,z=O==$;if(z&&o(w)){if(!o(b))return!1;k=!0,L=!1}if(z&&!L)return A||(A=new e),k||l(w)?t(w,b,_,S,x,A):n(w,b,O,_,S,x,A);if(!(_&c)){var P=L&&g.call(w,"__wrapped__"),q=M&&g.call(b,"__wrapped__");if(P||q){var D=P?w.value():w,H=q?b.value():b;return A||(A=new e),x(D,H,_,S,A)}}return z?(A||(A=new e),r(w,b,_,S,x,A)):!1}return I1=v,I1}var P1,g$;function _E(){if(g$)return P1;g$=1;var e=Pfe(),t=ai();function n(r,i,a,o,l){return r===i?!0:r==null||i==null||!t(r)&&!t(i)?r!==r&&i!==i:e(r,i,a,o,n,l)}return P1=n,P1}var L1,y$;function Q6(){if(y$)return L1;y$=1;var e=_E();function t(n,r){return e(n,r)}return L1=t,L1}var z1,b$;function Lfe(){if(b$)return z1;b$=1;var e=hl(),t=rm(),n=lr(),r=e?e.isConcatSpreadable:void 0;function i(a){return n(a)||t(a)||!!(r&&a&&a[r])}return z1=i,z1}var q1,v$;function xE(){if(v$)return q1;v$=1;var e=gE(),t=Lfe();function n(r,i,a,o,l){var c=-1,f=r.length;for(a||(a=t),l||(l=[]);++c<f;){var d=r[c];i>0&&a(d)?i>1?n(d,i-1,a,o,l):e(l,d):o||(l[l.length]=d)}return l}return q1=n,q1}var F1,_$;function $s(){if(_$)return F1;_$=1;function e(t,n){for(var r=-1,i=t==null?0:t.length,a=Array(i);++r<i;)a[r]=n(t[r],r,t);return a}return F1=e,F1}var B1,x$;function lm(){if(x$)return B1;x$=1;var e=Rs(),t=ai(),n="[object Symbol]";function r(i){return typeof i=="symbol"||t(i)&&e(i)==n}return B1=r,B1}var U1,w$;function wE(){if(w$)return U1;w$=1;var e=lr(),t=lm(),n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,r=/^\w*$/;function i(a,o){if(e(a))return!1;var l=typeof a;return l=="number"||l=="symbol"||l=="boolean"||a==null||t(a)?!0:r.test(a)||!n.test(a)||o!=null&&a in Object(o)}return U1=i,U1}var V1,S$;function zfe(){if(S$)return V1;S$=1;var e=oE(),t="Expected a function";function n(r,i){if(typeof r!="function"||i!=null&&typeof i!="function")throw new TypeError(t);var a=function(){var o=arguments,l=i?i.apply(this,o):o[0],c=a.cache;if(c.has(l))return c.get(l);var f=r.apply(this,o);return a.cache=c.set(l,f)||c,f};return a.cache=new(n.Cache||e),a}return n.Cache=e,V1=n,V1}var H1,E$;function qfe(){if(E$)return H1;E$=1;var e=zfe(),t=500;function n(r){var i=e(r,function(o){return a.size===t&&a.clear(),o}),a=i.cache;return i}return H1=n,H1}var G1,k$;function Ffe(){if(k$)return G1;k$=1;var e=qfe(),t=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,n=/\\(\\)?/g,r=e(function(i){var a=[];return i.charCodeAt(0)===46&&a.push(""),i.replace(t,function(o,l,c,f){a.push(c?f.replace(n,"$1"):l||o)}),a});return G1=r,G1}var Y1,A$;function Bfe(){if(A$)return Y1;A$=1;var e=hl(),t=$s(),n=lr(),r=lm(),i=e?e.prototype:void 0,a=i?i.toString:void 0;function o(l){if(typeof l=="string")return l;if(n(l))return t(l,o)+"";if(r(l))return a?a.call(l):"";var c=l+"";return c=="0"&&1/l==-1/0?"-0":c}return Y1=o,Y1}var Z1,T$;function Ufe(){if(T$)return Z1;T$=1;var e=Bfe();function t(n){return n==null?"":e(n)}return Z1=t,Z1}var K1,C$;function J6(){if(C$)return K1;C$=1;var e=lr(),t=wE(),n=Ffe(),r=Ufe();function i(a,o){return e(a)?a:t(a,o)?[a]:n(r(a))}return K1=i,K1}var X1,O$;function um(){if(O$)return X1;O$=1;var e=lm();function t(n){if(typeof n=="string"||e(n))return n;var r=n+"";return r=="0"&&1/n==-1/0?"-0":r}return X1=t,X1}var W1,N$;function SE(){if(N$)return W1;N$=1;var e=J6(),t=um();function n(r,i){i=e(i,r);for(var a=0,o=i.length;r!=null&&a<o;)r=r[t(i[a++])];return a&&a==o?r:void 0}return W1=n,W1}var Q1,R$;function Vfe(){if(R$)return Q1;R$=1;var e=nm(),t=_E(),n=1,r=2;function i(a,o,l,c){var f=l.length,d=f,h=!c;if(a==null)return!d;for(a=Object(a);f--;){var m=l[f];if(h&&m[2]?m[1]!==a[m[0]]:!(m[0]in a))return!1}for(;++f<d;){m=l[f];var g=m[0],v=a[g],w=m[1];if(h&&m[2]){if(v===void 0&&!(g in a))return!1}else{var b=new e;if(c)var _=c(v,w,g,a,o,b);if(!(_===void 0?t(w,v,n|r,c,b):_))return!1}}return!0}return Q1=i,Q1}var J1,j$;function eL(){if(j$)return J1;j$=1;var e=ii();function t(n){return n===n&&!e(n)}return J1=t,J1}var e_,M$;function Hfe(){if(M$)return e_;M$=1;var e=eL(),t=qc();function n(r){for(var i=t(r),a=i.length;a--;){var o=i[a],l=r[o];i[a]=[o,l,e(l)]}return i}return e_=n,e_}var t_,$$;function tL(){if($$)return t_;$$=1;function e(t,n){return function(r){return r==null?!1:r[t]===n&&(n!==void 0||t in Object(r))}}return t_=e,t_}var n_,D$;function Gfe(){if(D$)return n_;D$=1;var e=Vfe(),t=Hfe(),n=tL();function r(i){var a=t(i);return a.length==1&&a[0][2]?n(a[0][0],a[0][1]):function(o){return o===i||e(o,i,a)}}return n_=r,n_}var r_,I$;function Yfe(){if(I$)return r_;I$=1;var e=SE();function t(n,r,i){var a=n==null?void 0:e(n,r);return a===void 0?i:a}return r_=t,r_}var i_,P$;function Zfe(){if(P$)return i_;P$=1;function e(t,n){return t!=null&&n in Object(t)}return i_=e,i_}var a_,L$;function Kfe(){if(L$)return a_;L$=1;var e=J6(),t=rm(),n=lr(),r=uE(),i=cE(),a=um();function o(l,c,f){c=e(c,l);for(var d=-1,h=c.length,m=!1;++d<h;){var g=a(c[d]);if(!(m=l!=null&&f(l,g)))break;l=l[g]}return m||++d!=h?m:(h=l==null?0:l.length,!!h&&i(h)&&r(g,h)&&(n(l)||t(l)))}return a_=o,a_}var s_,z$;function Xfe(){if(z$)return s_;z$=1;var e=Zfe(),t=Kfe();function n(r,i){return r!=null&&t(r,i,e)}return s_=n,s_}var o_,q$;function Wfe(){if(q$)return o_;q$=1;var e=_E(),t=Yfe(),n=Xfe(),r=wE(),i=eL(),a=tL(),o=um(),l=1,c=2;function f(d,h){return r(d)&&i(h)?a(o(d),h):function(m){var g=t(m,d);return g===void 0&&g===h?n(m,d):e(h,g,l|c)}}return o_=f,o_}var l_,F$;function Fc(){if(F$)return l_;F$=1;function e(t){return t}return l_=e,l_}var u_,B$;function Qfe(){if(B$)return u_;B$=1;function e(t){return function(n){return n==null?void 0:n[t]}}return u_=e,u_}var c_,U$;function Jfe(){if(U$)return c_;U$=1;var e=SE();function t(n){return function(r){return e(r,n)}}return c_=t,c_}var f_,V$;function ede(){if(V$)return f_;V$=1;var e=Qfe(),t=Jfe(),n=wE(),r=um();function i(a){return n(a)?e(r(a)):t(a)}return f_=i,f_}var d_,H$;function tde(){if(H$)return d_;H$=1;var e=Gfe(),t=Wfe(),n=Fc(),r=lr(),i=ede();function a(o){return typeof o=="function"?o:o==null?n:typeof o=="object"?r(o)?t(o[0],o[1]):e(o):i(o)}return d_=a,d_}var h_,G$;function nde(){if(G$)return h_;G$=1;function e(t){return function(n,r,i){for(var a=-1,o=Object(n),l=i(n),c=l.length;c--;){var f=l[t?c:++a];if(r(o[f],f,o)===!1)break}return n}}return h_=e,h_}var p_,Y$;function nL(){if(Y$)return p_;Y$=1;var e=nde(),t=e();return p_=t,p_}var m_,Z$;function rde(){if(Z$)return m_;Z$=1;var e=nL(),t=qc();function n(r,i){return r&&e(r,i,t)}return m_=n,m_}var g_,K$;function ide(){if(K$)return g_;K$=1;var e=pl();function t(n,r){return function(i,a){if(i==null)return i;if(!e(i))return n(i,a);for(var o=i.length,l=r?o:-1,c=Object(i);(r?l--:++l<o)&&a(c[l],l,c)!==!1;);return i}}return g_=t,g_}var y_,X$;function rL(){if(X$)return y_;X$=1;var e=rde(),t=ide(),n=t(e);return y_=n,y_}var b_,W$;function ade(){if(W$)return b_;W$=1;var e=rL(),t=pl();function n(r,i){var a=-1,o=t(r)?Array(r.length):[];return e(r,function(l,c,f){o[++a]=i(l,c,f)}),o}return b_=n,b_}var v_,Q$;function sde(){if(Q$)return v_;Q$=1;function e(t,n){var r=t.length;for(t.sort(n);r--;)t[r]=t[r].value;return t}return v_=e,v_}var __,J$;function ode(){if(J$)return __;J$=1;var e=lm();function t(n,r){if(n!==r){var i=n!==void 0,a=n===null,o=n===n,l=e(n),c=r!==void 0,f=r===null,d=r===r,h=e(r);if(!f&&!h&&!l&&n>r||l&&c&&d&&!f&&!h||a&&c&&d||!i&&d||!o)return 1;if(!a&&!l&&!h&&n<r||h&&i&&o&&!a&&!l||f&&i&&o||!c&&o||!d)return-1}return 0}return __=t,__}var x_,e4;function lde(){if(e4)return x_;e4=1;var e=ode();function t(n,r,i){for(var a=-1,o=n.criteria,l=r.criteria,c=o.length,f=i.length;++a<c;){var d=e(o[a],l[a]);if(d){if(a>=f)return d;var h=i[a];return d*(h=="desc"?-1:1)}}return n.index-r.index}return x_=t,x_}var w_,t4;function ude(){if(t4)return w_;t4=1;var e=$s(),t=SE(),n=tde(),r=ade(),i=sde(),a=Ms(),o=lde(),l=Fc(),c=lr();function f(d,h,m){h.length?h=e(h,function(w){return c(w)?function(b){return t(b,w.length===1?w[0]:w)}:w}):h=[l];var g=-1;h=e(h,a(n));var v=r(d,function(w,b,_){var S=e(h,function(x){return x(w)});return{criteria:S,index:++g,value:w}});return i(v,function(w,b){return o(w,b,m)})}return w_=f,w_}var S_,n4;function iL(){if(n4)return S_;n4=1;function e(t,n,r){switch(r.length){case 0:return t.call(n);case 1:return t.call(n,r[0]);case 2:return t.call(n,r[0],r[1]);case 3:return t.call(n,r[0],r[1],r[2])}return t.apply(n,r)}return S_=e,S_}var E_,r4;function cde(){if(r4)return E_;r4=1;var e=iL(),t=Math.max;function n(r,i,a){return i=t(i===void 0?r.length-1:i,0),function(){for(var o=arguments,l=-1,c=t(o.length-i,0),f=Array(c);++l<c;)f[l]=o[i+l];l=-1;for(var d=Array(i+1);++l<i;)d[l]=o[l];return d[i]=a(f),e(r,this,d)}}return E_=n,E_}var k_,i4;function fde(){if(i4)return k_;i4=1;function e(t){return function(){return t}}return k_=e,k_}var A_,a4;function dde(){if(a4)return A_;a4=1;var e=fde(),t=L6(),n=Fc(),r=t?function(i,a){return t(i,"toString",{configurable:!0,enumerable:!1,value:e(a),writable:!0})}:n;return A_=r,A_}var T_,s4;function hde(){if(s4)return T_;s4=1;var e=800,t=16,n=Date.now;function r(i){var a=0,o=0;return function(){var l=n(),c=t-(l-o);if(o=l,c>0){if(++a>=e)return arguments[0]}else a=0;return i.apply(void 0,arguments)}}return T_=r,T_}var C_,o4;function pde(){if(o4)return C_;o4=1;var e=dde(),t=hde(),n=t(e);return C_=n,C_}var O_,l4;function Ds(){if(l4)return O_;l4=1;var e=Fc(),t=cde(),n=pde();function r(i,a){return n(t(i,a,e),i+"")}return O_=r,O_}var N_,u4;function EE(){if(u4)return N_;u4=1;var e=dl(),t=pl(),n=uE(),r=ii();function i(a,o,l){if(!r(l))return!1;var c=typeof o;return(c=="number"?t(l)&&n(o,l.length):c=="string"&&o in l)?e(l[o],a):!1}return N_=i,N_}var R_,c4;function aL(){if(c4)return R_;c4=1;var e=xE(),t=ude(),n=Ds(),r=EE(),i=n(function(a,o){if(a==null)return[];var l=o.length;return l>1&&r(a,o[0],o[1])?o=[]:l>2&&r(o[0],o[1],o[2])&&(o=[o[0]]),t(a,e(o,1),[])});return R_=i,R_}var j_,f4;function mde(){if(f4)return j_;f4=1;function e(t,n,r,i){for(var a=t.length,o=r+(i?1:-1);i?o--:++o<a;)if(n(t[o],o,t))return o;return-1}return j_=e,j_}var M_,d4;function gde(){if(d4)return M_;d4=1;function e(t){return t!==t}return M_=e,M_}var $_,h4;function yde(){if(h4)return $_;h4=1;function e(t,n,r){for(var i=r-1,a=t.length;++i<a;)if(t[i]===n)return i;return-1}return $_=e,$_}var D_,p4;function sL(){if(p4)return D_;p4=1;var e=mde(),t=gde(),n=yde();function r(i,a,o){return a===a?n(i,a,o):e(i,t,o)}return D_=r,D_}var I_,m4;function kE(){if(m4)return I_;m4=1;var e=sL();function t(n,r){var i=n==null?0:n.length;return!!i&&e(n,r,0)>-1}return I_=t,I_}var P_,g4;function AE(){if(g4)return P_;g4=1;function e(t,n,r){for(var i=-1,a=t==null?0:t.length;++i<a;)if(r(n,t[i]))return!0;return!1}return P_=e,P_}var L_,y4;function bde(){if(y4)return L_;y4=1;function e(){}return L_=e,L_}var z_,b4;function vde(){if(b4)return z_;b4=1;var e=Y6(),t=bde(),n=vE(),r=1/0,i=e&&1/n(new e([,-0]))[1]==r?function(a){return new e(a)}:t;return z_=i,z_}var q_,v4;function oL(){if(v4)return q_;v4=1;var e=sm(),t=kE(),n=AE(),r=om(),i=vde(),a=vE(),o=200;function l(c,f,d){var h=-1,m=t,g=c.length,v=!0,w=[],b=w;if(d)v=!1,m=n;else if(g>=o){var _=f?null:i(c);if(_)return a(_);v=!1,m=r,b=new e}else b=f?[]:w;e:for(;++h<g;){var S=c[h],x=f?f(S):S;if(S=d||S!==0?S:0,v&&x===x){for(var A=b.length;A--;)if(b[A]===x)continue e;f&&b.push(x),w.push(S)}else m(b,x,d)||(b!==w&&b.push(x),w.push(S))}return w}return q_=l,q_}var F_,_4;function TE(){if(_4)return F_;_4=1;var e=oL();function t(n){return n&&n.length?e(n):[]}return F_=t,F_}var B_,x4;function CE(){if(x4)return B_;x4=1;var e=oL();function t(n,r){return r=typeof r=="function"?r:void 0,n&&n.length?e(n,void 0,r):[]}return B_=t,B_}var U_,w4;function _de(){if(w4)return U_;w4=1;var e=Ds(),t=dl(),n=EE(),r=ml(),i=Object.prototype,a=i.hasOwnProperty,o=e(function(l,c){l=Object(l);var f=-1,d=c.length,h=d>2?c[2]:void 0;for(h&&n(c[0],c[1],h)&&(d=1);++f<d;)for(var m=c[f],g=r(m),v=-1,w=g.length;++v<w;){var b=g[v],_=l[b];(_===void 0||t(_,i[b])&&!a.call(l,b))&&(l[b]=m[b])}return l});return U_=o,U_}var V_,S4;function lL(){if(S4)return V_;S4=1;var e=sm(),t=kE(),n=AE(),r=$s(),i=Ms(),a=om(),o=Math.min;function l(c,f,d){for(var h=d?n:t,m=c[0].length,g=c.length,v=g,w=Array(g),b=1/0,_=[];v--;){var S=c[v];v&&f&&(S=r(S,i(f))),b=o(S.length,b),w[v]=!d&&(f||m>=120&&S.length>=120)?new e(v&&S):void 0}S=c[0];var x=-1,A=w[0];e:for(;++x<m&&_.length<b;){var k=S[x],T=f?f(k):k;if(k=d||k!==0?k:0,!(A?a(A,T):h(_,T,d))){for(v=g;--v;){var O=w[v];if(!(O?a(O,T):h(c[v],T,d)))continue e}A&&A.push(T),_.push(k)}}return _}return V_=l,V_}var H_,E4;function OE(){if(E4)return H_;E4=1;var e=pl(),t=ai();function n(r){return t(r)&&e(r)}return H_=n,H_}var G_,k4;function uL(){if(k4)return G_;k4=1;var e=OE();function t(n){return e(n)?n:[]}return G_=t,G_}var Y_,A4;function xde(){if(A4)return Y_;A4=1;function e(t){var n=t==null?0:t.length;return n?t[n-1]:void 0}return Y_=e,Y_}var Z_,T4;function cL(){if(T4)return Z_;T4=1;var e=$s(),t=lL(),n=Ds(),r=uL(),i=xde(),a=n(function(o){var l=i(o),c=e(o,r);return l=typeof l=="function"?l:void 0,l&&c.pop(),c.length&&c[0]===o[0]?t(c,void 0,l):[]});return Z_=a,Z_}var K_,C4;function cm(){if(C4)return K_;C4=1;var e=Rs(),t=yE(),n=ai(),r="[object Object]",i=Function.prototype,a=Object.prototype,o=i.toString,l=a.hasOwnProperty,c=o.call(Object);function f(d){if(!n(d)||e(d)!=r)return!1;var h=t(d);if(h===null)return!0;var m=l.call(h,"constructor")&&h.constructor;return typeof m=="function"&&m instanceof m&&o.call(m)==c}return K_=f,K_}var X_,O4;function wde(){if(O4)return X_;O4=1;var e=Rs(),t=ai(),n="[object Boolean]";function r(i){return i===!0||i===!1||t(i)&&e(i)==n}return X_=r,X_}var W_,N4;function NE(){if(N4)return W_;N4=1;var e=Q6(),t=aL(),n=TE(),r=CE(),i=_de(),a=cL(),o=cm(),l=wde(),c=q=>Array.isArray(q)?q:[q],f=q=>q===void 0,d=q=>o(q)||Array.isArray(q)?Object.keys(q):[],h=(q,D)=>q.hasOwnProperty(D),m=q=>t(n(q)),g=q=>f(q)||Array.isArray(q)&&q.length===0,v=(q,D,H,B)=>D&&h(D,H)&&q&&h(q,H)&&B(q[H],D[H]),w=(q,D)=>f(q)&&D===0||f(D)&&q===0||e(q,D),b=(q,D)=>f(q)&&D===!1||f(D)&&q===!1||e(q,D),_=q=>f(q)||e(q,{})||q===!0,S=q=>f(q)||e(q,{}),x=q=>f(q)||o(q)||q===!0||q===!1;function A(q,D){return g(q)&&g(D)?!0:e(m(q),m(D))}function k(q,D){return q=c(q),D=c(D),e(m(q),m(D))}function T(q,D,H,B){var G=n(d(q).concat(d(D)));return S(q)&&S(D)?!0:S(q)&&d(D).length||S(D)&&d(q).length?!1:G.every(function(K){var Q=q[K],R=D[K];return Array.isArray(Q)&&Array.isArray(R)?e(m(q),m(D)):Array.isArray(Q)&&!Array.isArray(R)||Array.isArray(R)&&!Array.isArray(Q)?!1:v(q,D,K,B)})}function O(q,D,H,B){return o(q)&&o(D)?B(q,D):Array.isArray(q)&&Array.isArray(D)?T(q,D,H,B):e(q,D)}function $(q,D,H,B){var G=r(q,B),K=r(D,B),Q=a(G,K,B);return Q.length===Math.max(G.length,K.length)}var L={title:e,uniqueItems:b,minLength:w,minItems:w,minProperties:w,required:A,enum:A,type:k,items:O,anyOf:$,allOf:$,oneOf:$,properties:T,patternProperties:T,dependencies:T},M=["properties","patternProperties","dependencies","uniqueItems","minLength","minItems","minProperties","required"],z=["additionalProperties","additionalItems","contains","propertyNames","not"];function P(q,D,H){if(H=i(H,{ignore:[]}),_(q)&&_(D))return!0;if(!x(q)||!x(D))throw new Error("Either of the values are not a JSON schema.");if(q===D)return!0;if(l(q)&&l(D))return q===D;if(q===void 0&&D===!1||D===void 0&&q===!1||f(q)&&!f(D)||!f(q)&&f(D))return!1;var B=n(Object.keys(q).concat(Object.keys(D)));if(H.ignore.length&&(B=B.filter(K=>H.ignore.indexOf(K)===-1)),!B.length)return!0;function G(K,Q){return P(K,Q,H)}return B.every(function(K){var Q=q[K],R=D[K];if(z.indexOf(K)!==-1)return P(Q,R,H);var V=L[K];if(V||(V=e),e(Q,R))return!0;if(M.indexOf(K)===-1&&(!h(q,K)&&h(D,K)||h(q,K)&&!h(D,K)))return Q===R;var X=V(Q,R,K,G);if(!l(X))throw new Error("Comparer must return true or false");return X})}return W_=P,W_}var Q_,R4;function RE(){if(R4)return Q_;R4=1;function e(t){return Object.prototype.toString.call(t)==="[object Array]"}return Q_=Array.isArray||e,Q_}var J_,j4;function Sde(){if(j4)return J_;j4=1;function e(t){return(typeof t=="number"||Object.prototype.toString.call(t)==="[object Number]")&&t.valueOf()===t.valueOf()}return J_=e,J_}var ex,M4;function Ede(){if(M4)return ex;M4=1;var e=Sde();function t(n){return e(n)&&n%1===0}return ex=t,ex}var tx,$4;function fL(){if($4)return tx;$4=1;var e=RE(),t=Ede();function n(r){var i;if(!e(r)||(i=r.length,!i))return!1;for(var a=0;a<i;a++)if(!t(r[a]))return!1;return!0}return tx=n,tx}var nx,D4;function dL(){if(D4)return nx;D4=1;function e(t){return typeof t=="function"}return nx=e,nx}var rx,I4;function kde(){if(I4)return rx;I4=1;var e=RE(),t=fL(),n=dL(),r=Math.pow(2,31)-1;function i(l,c){var f=1,d;if(l===0)return c;if(c===0)return l;for(;l%2===0&&c%2===0;)l=l/2,c=c/2,f=f*2;for(;l%2===0;)l=l/2;for(;c;){for(;c%2===0;)c=c/2;l>c&&(d=c,c=l,l=d),c=c-l}return f*l}function a(l,c){var f=0,d;if(l===0)return c;if(c===0)return l;for(;(l&1)===0&&(c&1)===0;)l>>>=1,c>>>=1,f++;for(;(l&1)===0;)l>>>=1;for(;c;){for(;(c&1)===0;)c>>>=1;l>c&&(d=c,c=l,l=d),c=c-l}return l<<f}function o(){var l=arguments.length,c,f,d,h,m,g,v;for(c=new Array(l),v=0;v<l;v++)c[v]=arguments[v];if(t(c)){if(l===2)return m=c[0],g=c[1],m<0&&(m=-m),g<0&&(g=-g),m<=r&&g<=r?a(m,g):i(m,g);d=c}else if(e(c[0]))if(l>1){if(d=c[0],f=c[1],!n(f))throw new TypeError("gcd()::invalid input argument. Accessor must be a function. Value: `"+f+"`.")}else d=c[0];else throw new TypeError("gcd()::invalid input argument. Must provide an array of integers. Value: `"+c[0]+"`.");if(h=d.length,h<2)return null;if(f){for(m=new Array(h),v=0;v<h;v++)m[v]=f(d[v],v);d=m}if(l<3&&!t(d))throw new TypeError("gcd()::invalid input argument. Accessed array values must be integers. Value: `"+d+"`.");for(v=0;v<h;v++)m=d[v],m<0&&(d[v]=-m);for(m=d[0],v=1;v<h;v++)g=d[v],g<=r&&m<=r?m=a(m,g):m=i(m,g);return m}return rx=o,rx}var ix,P4;function Ade(){if(P4)return ix;P4=1;var e=kde(),t=RE(),n=fL(),r=dL();function i(){var a=arguments.length,o,l,c,f,d,h,m;for(o=new Array(a),m=0;m<a;m++)o[m]=arguments[m];if(n(o)){if(a===2)return d=o[0],h=o[1],d<0&&(d=-d),h<0&&(h=-h),d===0||h===0?0:d/e(d,h)*h;c=o}else if(t(o[0]))if(a>1){if(c=o[0],l=o[1],!r(l))throw new TypeError("lcm()::invalid input argument. Accessor must be a function. Value: `"+l+"`.")}else c=o[0];else throw new TypeError("lcm()::invalid input argument. Must provide an array of integers. Value: `"+o[0]+"`.");if(f=c.length,f<2)return null;if(l){for(d=new Array(f),m=0;m<f;m++)d[m]=l(c[m],m);c=d}if(a<3&&!n(c))throw new TypeError("lcm()::invalid input argument. Accessed array values must be integers. Value: `"+c+"`.");for(m=0;m<f;m++)d=c[m],d<0&&(c[m]=-d);for(d=c[0],m=1;m<f;m++){if(h=c[m],d===0||h===0)return 0;d=d/e(d,h)*h}return d}return ix=i,ix}var ax,L4;function hL(){if(L4)return ax;L4=1;var e=lE(),t=dl();function n(r,i,a){(a!==void 0&&!t(r[i],a)||a===void 0&&!(i in r))&&e(r,i,a)}return ax=n,ax}var sx,z4;function pL(){if(z4)return sx;z4=1;function e(t,n){if(!(n==="constructor"&&typeof t[n]=="function")&&n!="__proto__")return t[n]}return sx=e,sx}var ox,q4;function Tde(){if(q4)return ox;q4=1;var e=zc(),t=ml();function n(r){return e(r,t(r))}return ox=n,ox}var lx,F4;function Cde(){if(F4)return lx;F4=1;var e=hL(),t=B6(),n=K6(),r=pE(),i=X6(),a=rm(),o=lr(),l=OE(),c=im(),f=aE(),d=ii(),h=cm(),m=dE(),g=pL(),v=Tde();function w(b,_,S,x,A,k,T){var O=g(b,S),$=g(_,S),L=T.get($);if(L){e(b,S,L);return}var M=k?k(O,$,S+"",b,_,T):void 0,z=M===void 0;if(z){var P=o($),q=!P&&c($),D=!P&&!q&&m($);M=$,P||q||D?o(O)?M=O:l(O)?M=r(O):q?(z=!1,M=t($,!0)):D?(z=!1,M=n($,!0)):M=[]:h($)||a($)?(M=O,a(O)?M=v(O):(!d(O)||f(O))&&(M=i($))):z=!1}z&&(T.set($,M),A(M,$,x,k,T),T.delete($)),e(b,S,M)}return lx=w,lx}var ux,B4;function mL(){if(B4)return ux;B4=1;var e=nm(),t=hL(),n=nL(),r=Cde(),i=ii(),a=ml(),o=pL();function l(c,f,d,h,m){c!==f&&n(f,function(g,v){if(m||(m=new e),i(g))r(c,f,v,d,l,h,m);else{var w=h?h(o(c,v),g,v+"",c,f,m):void 0;w===void 0&&(w=g),t(c,v,w)}},a)}return ux=l,ux}var cx,U4;function Ode(){if(U4)return cx;U4=1;var e=mL(),t=ii();function n(r,i,a,o,l,c){return t(r)&&t(i)&&(c.set(i,r),e(r,i,void 0,n,c),c.delete(i)),r}return cx=n,cx}var fx,V4;function Nde(){if(V4)return fx;V4=1;var e=Ds(),t=EE();function n(r){return e(function(i,a){var o=-1,l=a.length,c=l>1?a[l-1]:void 0,f=l>2?a[2]:void 0;for(c=r.length>3&&typeof c=="function"?(l--,c):void 0,f&&t(a[0],a[1],f)&&(c=l<3?void 0:c,l=1),i=Object(i);++o<l;){var d=a[o];d&&r(i,d,o,c)}return i})}return fx=n,fx}var dx,H4;function Rde(){if(H4)return dx;H4=1;var e=mL(),t=Nde(),n=t(function(r,i,a,o){e(r,i,a,o)});return dx=n,dx}var hx,G4;function jde(){if(G4)return hx;G4=1;var e=iL(),t=Ds(),n=Ode(),r=Rde(),i=t(function(a){return a.push(void 0,n),e(r,void 0,a)});return hx=i,hx}var px,Y4;function gL(){if(Y4)return px;Y4=1;var e=xE();function t(n){var r=n==null?0:n.length;return r?e(n,1):[]}return px=t,px}var mx,Z4;function yL(){if(Z4)return mx;Z4=1;var e=xE(),t=1/0;function n(r){var i=r==null?0:r.length;return i?e(r,t):[]}return mx=n,mx}var gx,K4;function Mde(){if(K4)return gx;K4=1;var e=$s(),t=lL(),n=Ds(),r=uL(),i=n(function(a){var o=e(a,r);return o.length&&o[0]===a[0]?t(o):[]});return gx=i,gx}var yx,X4;function $de(){if(X4)return yx;X4=1;function e(t,n,r,i){for(var a=r-1,o=t.length;++a<o;)if(i(t[a],n))return a;return-1}return yx=e,yx}var bx,W4;function Dde(){if(W4)return bx;W4=1;var e=$s(),t=sL(),n=$de(),r=Ms(),i=pE(),a=Array.prototype,o=a.splice;function l(c,f,d,h){var m=h?n:t,g=-1,v=f.length,w=c;for(c===f&&(f=i(f)),d&&(w=e(c,r(d)));++g<v;)for(var b=0,_=f[g],S=d?d(_):_;(b=m(w,S,b,h))>-1;)w!==c&&o.call(w,b,1),o.call(c,b,1);return c}return bx=l,bx}var vx,Q4;function Ide(){if(Q4)return vx;Q4=1;var e=Dde();function t(n,r){return n&&n.length&&r&&r.length?e(n,r):n}return vx=t,vx}var _x,J4;function Pde(){if(J4)return _x;J4=1;var e=Fc();function t(n){return typeof n=="function"?n:e}return _x=t,_x}var xx,eD;function bL(){if(eD)return xx;eD=1;var e=P6(),t=rL(),n=Pde(),r=lr();function i(a,o){var l=r(a)?e:t;return l(a,n(o))}return xx=i,xx}var wx,tD;function Lde(){if(tD)return wx;tD=1;var e=sm(),t=kE(),n=AE(),r=$s(),i=Ms(),a=om(),o=200;function l(c,f,d,h){var m=-1,g=t,v=!0,w=c.length,b=[],_=f.length;if(!w)return b;d&&(f=r(f,i(d))),h?(g=n,v=!1):f.length>=o&&(g=a,v=!1,f=new e(f));e:for(;++m<w;){var S=c[m],x=d==null?S:d(S);if(S=h||S!==0?S:0,v&&x===x){for(var A=_;A--;)if(f[A]===x)continue e;b.push(S)}else g(f,x,h)||b.push(S)}return b}return wx=l,wx}var Sx,nD;function zde(){if(nD)return Sx;nD=1;var e=Lde(),t=Ds(),n=OE(),r=t(function(i,a){return n(i)?e(i,a):[]});return Sx=r,Sx}var Ex,rD;function vL(){if(rD)return Ex;rD=1;const e=gL(),t=yL(),n=cm(),r=TE(),i=CE(),a=zde();function o(w){for(const b in w)f(w,b)&&g(w[b])&&delete w[b];return w}const l=w=>r(t(w.map(d))),c=(w,b)=>w.map(_=>_&&_[b]),f=(w,b)=>Object.prototype.hasOwnProperty.call(w,b),d=w=>n(w)||Array.isArray(w)?Object.keys(w):[],h=w=>w!==void 0,m=w=>n(w)||w===!0||w===!1,g=w=>!d(w).length&&w!==!1&&w!==!0;return Ex={allUniqueKeys:l,deleteUndefinedProps:o,getValues:c,has:f,isEmptySchema:g,isSchema:m,keys:d,notUndefined:h,uniqWith:i,withoutArr:(w,...b)=>a.apply(null,[w].concat(e(b)))},Ex}var kx,iD;function qde(){if(iD)return kx;iD=1;const e=NE(),t=bL(),{allUniqueKeys:n,deleteUndefinedProps:r,getValues:i,keys:a,notUndefined:o,uniqWith:l,withoutArr:c}=vL();function f(h){t(h,function(m,g){m===!1&&delete h[g]})}function d(h,m){return n(h).reduce(function(v,w){const b=i(h,w),_=l(b.filter(o),e);return v[w]=m(_,w),v},{})}return kx={keywords:["properties","patternProperties","additionalProperties"],resolver(h,m,g,v){v.ignoreAdditionalProperties||(h.forEach(function(b){const _=h.filter(k=>k!==b),S=a(b.properties),A=a(b.patternProperties).map(k=>new RegExp(k));_.forEach(function(k){const T=a(k.properties),O=T.filter(L=>A.some(M=>M.test(L)));c(T,S,O).forEach(function(L){k.properties[L]=g.properties([k.properties[L],b.additionalProperties],L)})})}),h.forEach(function(b){const _=h.filter(x=>x!==b),S=a(b.patternProperties);b.additionalProperties===!1&&_.forEach(function(x){const A=a(x.patternProperties);c(A,S).forEach(T=>delete x.patternProperties[T])})}));const w={additionalProperties:g.additionalProperties(h.map(b=>b.additionalProperties)),patternProperties:d(h.map(b=>b.patternProperties),g.patternProperties),properties:d(h.map(b=>b.properties),g.properties)};return w.additionalProperties===!1&&f(w.properties),r(w)}},kx}var Ax,aD;function Fde(){if(aD)return Ax;aD=1;const e=NE(),t=bL(),{allUniqueKeys:n,deleteUndefinedProps:r,has:i,isSchema:a,notUndefined:o,uniqWith:l}=vL();function c(m){t(m,function(g,v){g===!1&&m.splice(v,1)})}function f(m,g){return m.map(function(v){if(v)if(Array.isArray(v.items)){const w=v.items[g];if(a(w))return w;if(i(v,"additionalItems"))return v.additionalItems}else return v.items})}function d(m){return m.map(function(g){if(g)return Array.isArray(g.items)?g.additionalItems:g.items})}function h(m,g,v){return n(v).reduce(function(b,_){const S=f(m,_),x=l(S.filter(o),e);return b[_]=g(x,_),b},[])}return Ax={keywords:["items","additionalItems"],resolver(m,g,v){const w=m.map(x=>x.items),b=w.filter(o),_={};b.every(a)?_.items=v.items(w):_.items=h(m,v.items,w);let S;return b.every(Array.isArray)?S=m.map(x=>x.additionalItems):b.some(Array.isArray)&&(S=d(m)),S&&(_.additionalItems=v.additionalItems(S)),_.additionalItems===!1&&Array.isArray(_.items)&&c(_.items),r(_)}},Ax}var Tx,sD;function Bde(){if(sD)return Tx;sD=1;const e=Nfe(),t=NE(),n=Ade(),r=jde(),i=gL(),a=yL(),o=Mde(),l=cL(),c=Q6(),f=cm(),d=Ide(),h=aL(),m=TE(),g=CE(),v=qde(),w=Fde(),b=(re,le)=>re.indexOf(le)!==-1,_=re=>f(re)||re===!0||re===!1,S=re=>re===!1,x=re=>re===!0,A=(re,le,W)=>W(re),k=re=>h(m(a(re))),T=re=>re!==void 0,O=re=>m(a(re.map(K))),$=re=>re[0],L=re=>k(re),M=re=>Math.max.apply(Math,re),z=re=>Math.min.apply(Math,re),P=re=>re.some(x),q=re=>g(i(re),c);function D(re){return function(le,W){return t({[re]:le},{[re]:W})}}function H(re){let{allOf:le=[],...W}=re;return W=f(re)?W:re,[W,...le.map(H)]}function B(re,le){return re.map(W=>W&&W[le])}function G(re,le){return re.map(function(W,J){try{return le(W,J)}catch{return}}).filter(T)}function K(re){return f(re)||Array.isArray(re)?Object.keys(re):[]}function Q(re,le){if(le=le||[],!re.length)return le;const W=re.slice(0).shift(),J=re.slice(1);return le.length?Q(J,i(le.map(se=>W.map(fe=>[fe].concat(se))))):Q(J,W.map(se=>se))}function R(re,le){let W;try{W=re.map(function(J){return JSON.stringify(J,null,2)}).join(`
|
|
235
|
+
`)}catch{W=re.join(", ")}throw new Error('Could not resolve values for path:"'+le.join(".")+`". They are probably incompatible. Values:
|
|
236
|
+
`+W)}function V(re,le,W,J,se,fe){if(re.length){const me=se.complexResolvers[le];if(!me||!me.resolver)throw new Error("No resolver found for "+le);const xe=W.map(We=>re.reduce((He,$e)=>(We[$e]!==void 0&&(He[$e]=We[$e]),He),{})),we=g(xe,t),Ve=me.keywords.reduce((We,He)=>({...We,[He]:($e,Be=[])=>J($e,null,fe.concat(He,Be))}),{}),qe=me.resolver(we,fe.concat(le),Ve,se);return f(qe)||R(we,fe.concat(le)),qe}}function X(re){return{required:re}}const j=["properties","patternProperties","definitions","dependencies"],I=["anyOf","oneOf"],U=["additionalProperties","additionalItems","contains","propertyNames","not","items"],Y={type(re){if(re.some(Array.isArray)){const le=re.map(function(J){return Array.isArray(J)?J:[J]}),W=o.apply(null,le);if(W.length===1)return W[0];if(W.length>1)return m(W)}},dependencies(re,le,W){return O(re).reduce(function(se,fe){const me=B(re,fe);let xe=g(me.filter(T),c);const we=xe.filter(Array.isArray);if(we.length){if(we.length===xe.length)se[fe]=k(xe);else{const Ve=xe.filter(_),qe=we.map(X);se[fe]=W(Ve.concat(qe),fe)}return se}return xe=g(xe,t),se[fe]=W(xe,fe),se},{})},oneOf(re,le,W){const J=Q(e(re)),se=G(J,W),fe=g(se,t);if(fe.length)return fe},not(re){return{anyOf:re}},pattern(re){return re.map(le=>"(?="+le+")").join("")},multipleOf(re){let le=re.slice(0),W=1;for(;le.some(J=>!Number.isInteger(J));)le=le.map(J=>J*10),W=W*10;return n(le)/W},enum(re){const le=l.apply(null,re.concat(c));if(le.length)return h(le)}};Y.$id=$,Y.$ref=$,Y.$schema=$,Y.additionalItems=A,Y.additionalProperties=A,Y.anyOf=Y.oneOf,Y.contains=A,Y.default=$,Y.definitions=Y.dependencies,Y.description=$,Y.examples=q,Y.exclusiveMaximum=z,Y.exclusiveMinimum=M,Y.items=w,Y.maximum=z,Y.maxItems=z,Y.maxLength=z,Y.maxProperties=z,Y.minimum=M,Y.minItems=M,Y.minLength=M,Y.minProperties=M,Y.properties=v,Y.propertyNames=A,Y.required=L,Y.title=$,Y.uniqueItems=P;const ne={properties:v,items:w};function ae(re,le,W){le=r(le,{ignoreAdditionalProperties:!1,resolvers:Y,complexResolvers:ne,deep:!0});const J=Object.entries(le.complexResolvers);function se(xe,we,Ve){xe=e(xe.filter(T)),Ve=Ve||[];const qe=f(we)?we:{};if(!xe.length)return;if(xe.some(S))return!1;if(xe.every(x))return!0;xe=xe.filter(f);const We=O(xe);if(le.deep&&b(We,"allOf"))return ae({allOf:xe},le);const He=J.map(([$e,Be])=>We.filter(Ot=>Be.keywords.includes(Ot)));return He.forEach($e=>d(We,$e)),We.forEach(function($e){const Be=B(xe,$e),Ot=g(Be.filter(T),D($e));if(Ot.length===1&&b(I,$e))qe[$e]=Ot[0].map(kt=>se([kt],kt));else if(Ot.length===1&&!b(j,$e)&&!b(U,$e))qe[$e]=Ot[0];else{const kt=le.resolvers[$e]||le.resolvers.defaultResolver;if(!kt)throw new Error("No resolver found for key "+$e+". You can provide a resolver for this keyword in the options, or provide a default resolver.");const pe=(_e,Te=[])=>se(_e,null,Ve.concat($e,Te));qe[$e]=kt(Ot,Ve.concat($e),pe,le),qe[$e]===void 0?R(Ot,Ve.concat($e)):qe[$e]===void 0&&delete qe[$e]}}),J.reduce(($e,[Be,Ot],kt)=>({...$e,...V(He[kt],Be,xe,se,le,Ve)}),qe)}const fe=a(H(re));return se(fe)}return ae.options={resolvers:Y},Tx=ae,Tx}var Ude=Bde();const Vde=zn(Ude);function nl(e){let t;const n=Ne(e,"discriminator.propertyName",void 0);return Wp(n)?t=n:n!==void 0&&console.warn(`Expecting discriminator to be a string, got "${typeof n}" instead`),t}function yc(e){return Array.isArray(e)?"array":typeof e=="string"?"string":e==null?"null":typeof e=="boolean"?"boolean":isNaN(e)?typeof e=="object"?"object":"string":"number"}var Hde=iE(function(e){return $6(Lc(e,1,mp,!0))});function Ii(e){let{type:t}=e;return!t&&e.const?yc(e.const):!t&&e.enum?"string":!t&&(e.properties||e.additionalProperties)?"object":(Array.isArray(t)&&(t.length===2&&t.includes("null")?t=t.find(n=>n!=="null"):t=t[0]),t)}function Pi(e,t){const n=Object.assign({},e);return Object.keys(t).reduce((r,i)=>{const a=e?e[i]:{},o=t[i];return e&&i in e&<(o)?r[i]=Pi(a,o):e&&t&&(Ii(e)==="object"||Ii(t)==="object")&&i===eae&&Array.isArray(a)&&Array.isArray(o)?r[i]=Hde(a,o):r[i]=o,r},n)}function nr(e,t,n={},r,i){return Zr(e,t,n,r,void 0,void 0,i)[0]}function Gde(e,t,n,r,i,a,o){const{if:l,then:c,else:f,...d}=t,h=e.isValid(l,a||{},n);let m=[d],g=[];if(r)c&&typeof c!="boolean"&&(g=g.concat(Zr(e,c,n,a,r,i,o))),f&&typeof f!="boolean"&&(g=g.concat(Zr(e,f,n,a,r,i,o)));else{const v=h?c:f;v&&typeof v!="boolean"&&(g=g.concat(Zr(e,v,n,a,r,i,o)))}return g.length&&(m=g.map(v=>Pi(d,v))),m.flatMap(v=>Zr(e,v,n,a,r,i,o))}function _L(e){return e.reduce((n,r)=>r.length>1?r.flatMap(i=>O6(n.length,a=>[...n[a]].concat(i))):(n.forEach(i=>i.push(r[0])),n),[[]])}function Yde(e,t,n,r,i,a,o){const l=xL(e,t,n,r,i,a);if(l.length>1||l[0]!==t)return l;if(qp in t)return wL(e,t,n,r,i,a).flatMap(f=>Zr(e,f,n,a,r,i,o));if(ll in t&&Array.isArray(t.allOf)){const c=t.allOf.map(d=>Zr(e,d,n,a,r,i,o));return _L(c).map(d=>({...t,allOf:d}))}return[t]}function xL(e,t,n,r,i,a,o){const l=bc(t,n,i);return l!==t?Zr(e,l,n,a,r,i,o):[t]}function bc(e,t,n){if(!lt(e))return e;let r=e;if(rn in r){const{$ref:i,...a}=r;if(n.includes(i))return r;n.push(i),r={...v6(i,t),...a}}if(Bt in r){const i=[],a=fce(r[Bt],(o,l,c)=>{const f=[...n];o[c]=bc(l,t,f),i.push(f)},{});gce(n,Tce(bce(i))),r={...r,[Bt]:a}}return Ma in r&&!Array.isArray(r.items)&&typeof r.items!="boolean"&&(r={...r,items:bc(r.items,t,n)}),It(e,r)?e:r}function Zde(e,t,n,r,i){const a={...t,properties:{...t.properties}},o=r&<(r)?r:{};return Object.keys(o).forEach(l=>{if(l in a.properties)return;let c={};typeof a.additionalProperties!="boolean"?rn in a.additionalProperties?c=nr(e,{$ref:Ne(a.additionalProperties,[rn])},n,o,i):"type"in a.additionalProperties?c={...a.additionalProperties}:Mr in a.additionalProperties||tr in a.additionalProperties?c={type:"object",...a.additionalProperties}:c={type:yc(Ne(o,[l]))}:c={type:yc(Ne(o,[l]))},a.properties[l]=c,mn(a.properties,[l,Mc],!0)}),a}function Zr(e,t,n,r,i=!1,a=[],o){return lt(t)?Yde(e,t,n,i,a,r,o).flatMap(c=>{var f;let d=c;if(Qie in d)return Gde(e,d,n,i,a,r,o);if(ll in d){if(i){const{allOf:m,...g}=d;return[...m,g]}try{const m=[],g=[];(f=d.allOf)===null||f===void 0||f.forEach(v=>{typeof v=="object"&&v.contains?m.push(v):g.push(v)}),m.length&&(d={...d,allOf:g}),d=o?o(d):Vde(d,{deep:!1}),m.length&&(d.allOf=m)}catch(m){console.warn(`could not merge subschemas in allOf:
|
|
237
|
+
`,m);const{allOf:g,...v}=d;return v}}return qw in d&&d.additionalProperties!==!1?Zde(e,d,n,r,o):d}):[{}]}function Kde(e,t,n,r,i){let a;const{oneOf:o,anyOf:l,...c}=t;if(Array.isArray(o)?a=o:Array.isArray(l)&&(a=l),a){const f=i===void 0&&r?{}:i,d=nl(t);a=a.map(m=>bc(m,n,[]));const h=nE(e,f,a,n,d);if(r)return a.map(m=>Pi(c,m));t=Pi(c,a[h])}return[t]}function wL(e,t,n,r,i,a,o){const{dependencies:l,...c}=t;return Kde(e,c,n,r,a).flatMap(d=>SL(e,l,d,n,r,i,a,o))}function SL(e,t,n,r,i,a,o,l){let c=[n];for(const f in t){if(!i&&Ne(o,[f])===void 0||n.properties&&!(f in n.properties))continue;const[d,h]=eE(f,t);return Array.isArray(h)?c[0]=Xde(n,h):lt(h)&&(c=Wde(e,n,r,f,h,i,a,o,l)),c.flatMap(m=>SL(e,d,m,r,i,a,o,l))}return c}function Xde(e,t){if(!t)return e;const n=Array.isArray(e.required)?Array.from(new Set([...e.required,...t])):t;return{...e,required:n}}function Wde(e,t,n,r,i,a,o,l,c){return Zr(e,i,n,l,a,o,c).flatMap(d=>{const{oneOf:h,...m}=d;if(t=Pi(t,m),h===void 0)return t;const g=h.map(w=>typeof w=="boolean"||!(rn in w)?[w]:xL(e,w,n,a,o,l));return _L(g).flatMap(w=>Qde(e,t,n,r,w,a,o,l,c))})}function Qde(e,t,n,r,i,a,o,l,c){const f=i.filter(d=>{if(typeof d=="boolean"||!d||!d.properties)return!1;const{[r]:h}=d.properties;if(h){const m={type:"object",properties:{[r]:h}};return e.isValid(m,l,n)||a}return!1});return!a&&f.length!==1?(console.warn("ignoring oneOf in dependencies because there isn't exactly one subschema that is valid"),[t]):f.flatMap(d=>{const h=d,[m]=eE(r,h.properties),g={...h,properties:m};return Zr(e,g,n,l,a,o,c).map(w=>Pi(t,w))})}const Jde={type:"object",$id:Jie,properties:{__not_really_there__:{type:"number"}}};function Yw(e,t,n,r,i){let a=0;return n&&(Mt(n.properties)?a+=Xue(n.properties,(o,l,c)=>{const f=Ne(r,c);if(typeof l=="boolean")return o;if(An(l,rn)){const d=nr(e,l,t,f,i);return o+Yw(e,t,d,f||{},i)}if((An(l,tr)||An(l,Mr))&&f){const d=An(l,tr)?tr:Mr,h=nl(l);return o+vc(e,t,f,Ne(l,d),-1,h,i)}if(l.type==="object")return Mt(f)&&(o+=1),o+Yw(e,t,l,f,i);if(l.type===yc(f)){let d=o+1;return l.default?d+=f===l.default?1:-1:l.const&&(d+=f===l.const?1:-1),d}return o},0):Wp(n.type)&&n.type===yc(r)&&(a+=1)),a}function vc(e,t,n,r,i=-1,a,o){const l=r.map(m=>bc(m,t,[])),c=N6(n,r,a);if(x6(c))return c;const f=l.reduce((m,g,v)=>(nE(e,n,[Jde,g],t,a)===1&&m.push(v),m),[]);if(f.length===1)return f[0];f.length||O6(l.length,m=>f.push(m));const d=new Set,{bestIndex:h}=f.reduce((m,g)=>{const{bestScore:v}=m,w=l[g],b=Yw(e,t,w,n,o);return d.add(b),b>v?{bestIndex:g,bestScore:b}:m},{bestIndex:i,bestScore:0});return d.size===1&&i>=0?i:h}function Zw(e){return Array.isArray(e.items)&&e.items.length>0&&e.items.every(t=>lt(t))}function Wu(e){return e==null}function _c(e,t,n=!1,r=!1,i=!1){if(Array.isArray(t)){const a=Array.isArray(e)?e:[],o=i?a:t,l=i?t:a,c=o.map((f,d)=>l[d]!==void 0?_c(a[d],t[d],n,r,i):f);return(n||i)&&c.length<l.length&&c.push(...l.slice(c.length)),c}if(lt(t)){const a=Object.assign({},e);return Object.keys(t).reduce((o,l)=>{const c=Ne(t,l),f=lt(e)&&l in e,d=l in t;return o[l]=_c(e?Ne(e,l):{},c,n,r,i&&(f||!d)),o},a)}return r&&(!Wu(e)&&Wu(t)||typeof t=="number"&&isNaN(t))||i&&!Wu(t)?e:t}function Oi(e,t,n=!1){return Object.keys(t).reduce((r,i)=>{const a=e?e[i]:{},o=t[i];if(e&&i in e&<(o))r[i]=Oi(a,o,n);else if(n&&Array.isArray(a)&&Array.isArray(o)){let l=o;n==="preventDuplicates"&&(l=o.reduce((c,f)=>(a.includes(f)||c.push(f),c),[])),r[i]=a.concat(l)}else r[i]=o;return r},Object.assign({},e))}function EL(e){return Array.isArray(e.enum)&&e.enum.length===1||Di in e}function jE(e,t,n={},r){const i=nr(e,t,n,void 0,r),a=i.oneOf||i.anyOf;return Array.isArray(i.enum)?!0:Array.isArray(a)?a.every(o=>typeof o!="boolean"&&EL(o)):!1}function ME(e,t,n,r){return!t.uniqueItems||!t.items||typeof t.items=="boolean"?!1:jE(e,t.items,n,r)}function kL(e){const t=e[Di],n=Ii(e);return lt(t)&&Wp(t==null?void 0:t.$data)&&n!=="object"&&n!=="array"}function ehe(e){if(Wie in e&&Array.isArray(e.enum)&&e.enum.length===1)return e.enum[0];if(Di in e)return e.const;throw new Error("schema cannot be inferred as a constant")}function xc(e,t){const n=e;if(e.enum){let a;if(t){const{enumNames:o}=ot(t);a=o}return!a&&n.enumNames&&(a=n.enumNames),e.enum.map((o,l)=>({label:(a==null?void 0:a[l])||String(o),value:o}))}let r,i;return e.anyOf?(r=e.anyOf,i=t==null?void 0:t.anyOf):e.oneOf&&(r=e.oneOf,i=t==null?void 0:t.oneOf),r&&r.map((a,o)=>{const{title:l}=ot(i==null?void 0:i[o]),c=a,f=ehe(c),d=l||c.title||String(f);return{schema:c,label:d,value:f}})}const the=["string","number","integer","boolean","null"];var rl;(function(e){e[e.Ignore=0]="Ignore",e[e.Invert=1]="Invert",e[e.Fallback=2]="Fallback"})(rl||(rl={}));function Cx(e,t=rl.Ignore,n=-1){if(n>=0){if(Array.isArray(e.items)&&n<e.items.length){const r=e.items[n];if(typeof r!="boolean")return r}}else if(e.items&&!Array.isArray(e.items)&&typeof e.items!="boolean")return e.items;return t!==rl.Ignore&<(e.additionalItems)?e.additionalItems:{}}function oD(e,t,n,r,i,a=[],o={},l=!1){const{emptyObjectFields:c="populateAllDefaults"}=o;if(r||l)e[t]=n;else if(c!=="skipDefaults"){const f=i===void 0?a.includes(t):i;lt(n)?c==="skipEmptyDefaults"?tl(n)||(e[t]=n):(!tl(n)||a.includes(t))&&(f||c!=="populateRequiredDefaults")&&(e[t]=n):n!==void 0&&(c==="populateAllDefaults"||c==="skipEmptyDefaults"||f&&a.includes(t))&&(e[t]=n)}}function $a(e,t,n={}){const{parentDefaults:r,rawFormData:i,rootSchema:a={},includeUndefinedValues:o=!1,_recurseList:l=[],experimental_defaultFormStateBehavior:c=void 0,experimental_customMergeAllOf:f=void 0,required:d,shouldMergeDefaultsIntoFormData:h=!1}=n;let m=lt(i)?i:{};const g=lt(t)?t:{};let v=r,w=null,b=c,_=l;if(g[Di]!==void 0&&(c==null?void 0:c.constAsDefaults)!=="never"&&!kL(g))v=g[Di];else if(lt(v)&<(g.default))v=Oi(v,g.default);else if(Xie in g&&!g[Mr]&&!g[tr])v=g.default;else if(rn in g){const A=g[rn];l.includes(A)||(_=l.concat(A),w=v6(A,a)),w&&!v&&(v=g.default),h&&w&&!lt(i)&&(m=i)}else if(qp in g){const A={...lD(e,g,n,v),...m};w=wL(e,g,a,!1,[],A,f)[0]}else if(Zw(g))v=g.items.map((A,k)=>$a(e,A,{rootSchema:a,includeUndefinedValues:o,_recurseList:l,experimental_defaultFormStateBehavior:c,experimental_customMergeAllOf:f,parentDefaults:Array.isArray(r)?r[k]:void 0,rawFormData:m,required:d,shouldMergeDefaultsIntoFormData:h}));else if(tr in g){const{oneOf:A,...k}=g;if(A.length===0)return;const T=nl(g),{type:O="null"}=k;!Array.isArray(O)&&the.includes(O)&&(b==null?void 0:b.constAsDefaults)==="skipOneOf"&&(b={...b,constAsDefaults:"never"}),w=A[vc(e,a,i??g.default,A,0,T,f)],w=Pi(k,w)}else if(Mr in g){const{anyOf:A,...k}=g;if(A.length===0)return;const T=nl(g);w=A[vc(e,a,i??g.default,A,0,T,f)],w=Pi(k,w)}if(w)return $a(e,w,{rootSchema:a,includeUndefinedValues:o,_recurseList:_,experimental_defaultFormStateBehavior:b,experimental_customMergeAllOf:f,parentDefaults:v,rawFormData:i??m,required:d,shouldMergeDefaultsIntoFormData:h});v===void 0&&(v=g.default);const S=lD(e,g,n,v);let x=S??v;if(h){const{arrayMinItems:A={}}=c||{},{mergeExtraDefaults:k}=A,T=nhe(e,g,a,i,c,f);(!lt(i)||ll in g)&&(x=_c(x,T,k,!0))}return x}function nhe(e,t,n,r,i,a){const o=!EL(t)&&jE(e,t,n,a);let l=r;if(o){const f=xc(t);l=(f==null?void 0:f.some(h=>It(h.value,r)))?r:void 0}return t[Di]&&(i==null?void 0:i.constAsDefaults)==="always"&&(l=t.const),l}function rhe(e,t,{rawFormData:n,rootSchema:r={},includeUndefinedValues:i=!1,_recurseList:a=[],experimental_defaultFormStateBehavior:o=void 0,experimental_customMergeAllOf:l=void 0,required:c,shouldMergeDefaultsIntoFormData:f}={},d){{const h=lt(n)?n:{},m=t,g=(o==null?void 0:o.allOf)==="populateDefaults"&&ll in m?nr(e,m,r,h,l):m,v=g[Di],w=Object.keys(g.properties||{}).reduce((b,_)=>{var S;const x=Ne(g,[Bt,_]),A=lt(v)&&v[_]!==void 0,k=(lt(x)&&Di in x||A)&&(o==null?void 0:o.constAsDefaults)!=="never"&&!kL(x),T=$a(e,x,{rootSchema:r,_recurseList:a,experimental_defaultFormStateBehavior:o,experimental_customMergeAllOf:l,includeUndefinedValues:i===!0,parentDefaults:Ne(d,[_]),rawFormData:Ne(h,[_]),required:(S=g.required)===null||S===void 0?void 0:S.includes(_),shouldMergeDefaultsIntoFormData:f});return oD(b,_,T,i,c,g.required,o,k),b},{});if(g.additionalProperties){const b=lt(g.additionalProperties)?g.additionalProperties:{},_=new Set;lt(d)&&Object.keys(d).filter(x=>!g.properties||!g.properties[x]).forEach(x=>_.add(x));const S=[];Object.keys(h).filter(x=>!g.properties||!g.properties[x]).forEach(x=>{_.add(x),S.push(x)}),_.forEach(x=>{var A;const k=$a(e,b,{rootSchema:r,_recurseList:a,experimental_defaultFormStateBehavior:o,experimental_customMergeAllOf:l,includeUndefinedValues:i===!0,parentDefaults:Ne(d,[x]),rawFormData:Ne(h,[x]),required:(A=g.required)===null||A===void 0?void 0:A.includes(x),shouldMergeDefaultsIntoFormData:f});oD(w,x,k,i,c,S)})}return w}}function ihe(e,t,{rawFormData:n,rootSchema:r={},_recurseList:i=[],experimental_defaultFormStateBehavior:a=void 0,experimental_customMergeAllOf:o=void 0,required:l,shouldMergeDefaultsIntoFormData:c}={},f){var d,h;const m=t,g=(d=a==null?void 0:a.arrayMinItems)!==null&&d!==void 0?d:{},{populate:v,mergeExtraDefaults:w}=g,b=v==="never",_=v==="requiredOnly",S=v==="all"||!b&&!_,x=(h=g==null?void 0:g.computeSkipPopulate)!==null&&h!==void 0?h:()=>!1,k=(a==null?void 0:a.emptyObjectFields)==="skipEmptyDefaults"?void 0:[];if(Array.isArray(f)&&(f=f.map((P,q)=>{const D=Cx(m,rl.Fallback,q);return $a(e,D,{rootSchema:r,_recurseList:i,experimental_defaultFormStateBehavior:a,experimental_customMergeAllOf:o,parentDefaults:P,required:l,shouldMergeDefaultsIntoFormData:c})})),Array.isArray(n)){const P=Cx(m);if(b)f=n;else{const q=n.map((H,B)=>$a(e,P,{rootSchema:r,_recurseList:i,experimental_defaultFormStateBehavior:a,experimental_customMergeAllOf:o,rawFormData:H,parentDefaults:Ne(f,[B]),required:l,shouldMergeDefaultsIntoFormData:c}));f=_c(f,q,(_&&l||S)&&w)}}if((lt(m)&&Di in m&&(a==null?void 0:a.constAsDefaults)!=="never")===!1){if(b)return f??k;if(_&&!l)return f||void 0}const O=Array.isArray(f)?f.length:0;if(!m.minItems||ME(e,m,r,o)||x(e,m,r)||m.minItems<=O)return f||k;const $=f||[],L=Cx(m,rl.Invert),M=L.default,z=new Array(m.minItems-O).fill($a(e,L,{parentDefaults:M,rootSchema:r,_recurseList:i,experimental_defaultFormStateBehavior:a,experimental_customMergeAllOf:o,required:l,shouldMergeDefaultsIntoFormData:c}));return $.concat(z)}function lD(e,t,n={},r){switch(Ii(t)){case"object":return rhe(e,t,n,r);case"array":return ihe(e,t,n,r)}}function AL(e,t,n,r,i=!1,a,o){if(!lt(t))throw new Error("Invalid schema: "+t);const l=nr(e,t,r,n,o),c=$a(e,l,{rootSchema:r,includeUndefinedValues:i,experimental_defaultFormStateBehavior:a,experimental_customMergeAllOf:o,rawFormData:n,shouldMergeDefaultsIntoFormData:!0});if(lt(n)||Array.isArray(n)){const{mergeDefaultsIntoFormData:f}=a||{};return _c(c,n,!0,f==="useDefaultIfFormDataUndefined",!0)}return c}function TL(e={}){return"widget"in ot(e)&&ot(e).widget!=="hidden"}function CL(e,t,n={},r,i){if(n[LS]==="files")return!0;if(t.items){const a=nr(e,t.items,r,void 0,i);return a.type==="string"&&a.format==="data-url"}return!1}function ahe(e,t,n={},r,i,a){const o=ot(n,i),{label:l=!0}=o;let c=!!l;const f=Ii(t);return f==="array"&&(c=ME(e,t,r,a)||CL(e,t,n,r,a)||TL(n)),f==="object"&&(c=!1),f==="boolean"&&!n[LS]&&(c=!1),n[tae]&&(c=!1),c}function she(e,t,n){if(!n)return t;const{errors:r,errorSchema:i}=t;let a=e.toErrorList(n),o=n;return tl(i)||(o=Oi(i,n,!0),a=[...r].concat(a)),{errorSchema:o,errors:a}}const Co=Symbol("no Value");function Kw(e,t,n,r,i={},a){let o;if(An(n,Bt)){const l={};if(An(r,Bt)){const d=Ne(r,Bt,{});Object.keys(d).forEach(h=>{An(i,h)&&(l[h]=void 0)})}const c=Object.keys(Ne(n,Bt,{})),f={};c.forEach(d=>{const h=Ne(i,d);let m=Ne(r,[Bt,d],{}),g=Ne(n,[Bt,d],{});An(m,rn)&&(m=nr(e,m,t,h,a)),An(g,rn)&&(g=nr(e,g,t,h,a));const v=Ne(m,"type"),w=Ne(g,"type");if(!v||v===w)if(An(l,d)&&delete l[d],w==="object"||w==="array"&&Array.isArray(h)){const b=Kw(e,t,g,m,h,a);(b!==void 0||w==="array")&&(f[d]=b)}else{const b=Ne(g,"default",Co),_=Ne(m,"default",Co);b!==Co&&b!==h&&(_===h?l[d]=b:Ne(g,"readOnly")===!0&&(l[d]=void 0));const S=Ne(g,"const",Co),x=Ne(m,"const",Co);S!==Co&&S!==h&&(l[d]=x===h?S:void 0)}}),o={...typeof i=="string"||Array.isArray(i)?void 0:i,...l,...f}}else if(Ne(r,"type")==="array"&&Ne(n,"type")==="array"&&Array.isArray(i)){let l=Ne(r,"items"),c=Ne(n,"items");if(typeof l=="object"&&typeof c=="object"&&!Array.isArray(l)&&!Array.isArray(c)){An(l,rn)&&(l=nr(e,l,t,i,a)),An(c,rn)&&(c=nr(e,c,t,i,a));const f=Ne(l,"type"),d=Ne(c,"type");if(!f||f===d){const h=Ne(n,"maxItems",-1);d==="object"?o=i.reduce((m,g)=>{const v=Kw(e,t,c,l,g,a);return v!==void 0&&(h<0||m.length<h)&&m.push(v),m},[]):o=h>0&&i.length>h?i.slice(0,h):i}}else typeof l=="boolean"&&typeof c=="boolean"&&l===c&&(o=i)}return o}function Nh(e,t,n,r,i,a,o,l=[],c){if(rn in t||qp in t||ll in t){const h=nr(e,t,a,o,c);if(l.findIndex(g=>It(g,h))===-1)return Nh(e,h,n,r,i,a,o,l.concat(h),c)}if(Ma in t&&!Ne(t,[Ma,rn]))return Nh(e,Ne(t,Ma),n,r,i,a,o,l,c);const d={$id:i||n};if(Ii(t)==="object"&&Bt in t)for(const h in t.properties){const m=Ne(t,[Bt,h]),g=d[Ra]+r+h;d[h]=Nh(e,lt(m)?m:{},n,r,g,a,Ne(o,[h]),l,c)}return d}function ohe(e,t,n,r,i,a="root",o="_",l){return Nh(e,t,a,o,n,r,i,void 0,l)}function us(e,t,n,r,i,a=[],o){if(rn in t||qp in t||ll in t){const c=nr(e,t,r,i,o);if(a.findIndex(d=>It(d,c))===-1)return us(e,c,n,r,i,a.concat(c),o)}let l={[Oh]:n.replace(/^\./,"")};if(tr in t||Mr in t){const c=tr in t?t.oneOf:t.anyOf,f=nl(t),d=vc(e,r,i,c,0,f,o),h=c[d];l={...l,...us(e,h,n,r,i,a,o)}}if(qw in t&&t[qw]!==!1&&mn(l,PS,!0),Ma in t&&Array.isArray(i)){const{items:c,additionalItems:f}=t;Array.isArray(c)?i.forEach((d,h)=>{c[h]?l[h]=us(e,c[h],`${n}.${h}`,r,d,a,o):f?l[h]=us(e,f,`${n}.${h}`,r,d,a,o):console.warn(`Unable to generate path schema for "${n}.${h}". No schema defined for it`)}):i.forEach((d,h)=>{l[h]=us(e,c,`${n}.${h}`,r,d,a,o)})}else if(Bt in t)for(const c in t.properties){const f=Ne(t,[Bt,c]);l[c]=us(e,f,`${n}.${c}`,r,Ne(i,[c]),a,o)}return l}function lhe(e,t,n="",r,i,a){return us(e,t,n,r,i,void 0,a)}class uhe{constructor(t,n,r,i){this.rootSchema=n,this.validator=t,this.experimental_defaultFormStateBehavior=r,this.experimental_customMergeAllOf=i}getValidator(){return this.validator}doesSchemaUtilsDiffer(t,n,r={},i){return!t||!n?!1:this.validator!==t||!It(this.rootSchema,n)||!It(this.experimental_defaultFormStateBehavior,r)||this.experimental_customMergeAllOf!==i}getDefaultFormState(t,n,r=!1){return AL(this.validator,t,n,this.rootSchema,r,this.experimental_defaultFormStateBehavior,this.experimental_customMergeAllOf)}getDisplayLabel(t,n,r){return ahe(this.validator,t,n,this.rootSchema,r,this.experimental_customMergeAllOf)}getClosestMatchingOption(t,n,r,i){return vc(this.validator,this.rootSchema,t,n,r,i,this.experimental_customMergeAllOf)}getFirstMatchingOption(t,n,r){return nE(this.validator,t,n,this.rootSchema,r)}getMatchingOption(t,n,r){return R6(this.validator,t,n,this.rootSchema,r)}isFilesArray(t,n){return CL(this.validator,t,n,this.rootSchema,this.experimental_customMergeAllOf)}isMultiSelect(t){return ME(this.validator,t,this.rootSchema,this.experimental_customMergeAllOf)}isSelect(t){return jE(this.validator,t,this.rootSchema,this.experimental_customMergeAllOf)}mergeValidationData(t,n){return she(this.validator,t,n)}retrieveSchema(t,n){return nr(this.validator,t,this.rootSchema,n,this.experimental_customMergeAllOf)}sanitizeDataForNewSchema(t,n,r){return Kw(this.validator,this.rootSchema,t,n,r,this.experimental_customMergeAllOf)}toIdSchema(t,n,r,i="root",a="_"){return ohe(this.validator,t,n,this.rootSchema,r,i,a,this.experimental_customMergeAllOf)}toPathSchema(t,n,r){return lhe(this.validator,t,n,this.rootSchema,r,this.experimental_customMergeAllOf)}}function che(e,t,n={},r){return new uhe(e,t,n,r)}function fhe(e){var t;if(e.indexOf("data:")===-1)throw new Error("File is invalid: URI must be a dataURI");const r=e.slice(5).split(";base64,");if(r.length!==2)throw new Error("File is invalid: dataURI must be base64");const[i,a]=r,[o,...l]=i.split(";"),c=o||"",f=decodeURI(((t=l.map(d=>d.split("=")).find(([d])=>d==="name"))===null||t===void 0?void 0:t[1])||"unknown");try{const d=atob(a),h=new Array(d.length);for(let g=0;g<d.length;g++)h[g]=d.charCodeAt(g);return{blob:new window.Blob([new Uint8Array(h)],{type:c}),name:f}}catch(d){throw new Error("File is invalid: "+d.message)}}function ka(e,t){let n=String(e);for(;n.length<t;)n="0"+n;return n}function OL(e,t){if(e<=0&&t<=0)e=new Date().getFullYear()+e,t=new Date().getFullYear()+t;else if(e<0||t<0)throw new Error(`Both start (${e}) and stop (${t}) must both be <= 0 or > 0, got one of each`);if(e>t)return OL(t,e).reverse();const n=[];for(let r=e;r<=t;r++)n.push({value:r,label:ka(r,2)});return n}function dhe(e,t){let n=e;if(Array.isArray(t)){const r=n.split(/(%\d)/);t.forEach((i,a)=>{const o=r.findIndex(l=>l===`%${a+1}`);o>=0&&(r[o]=i)}),n=r.join("")}return n}function hhe(e,t){return dhe(e,t)}function Qr(e,t=[],n){if(Array.isArray(e))return e.map(a=>Qr(a,t)).filter(a=>a!==n);const r=e===""||e===null?-1:Number(e),i=t[r];return i?i.value:n}function phe(e,t,n=[]){const r=Qr(e,n);return Array.isArray(t)?t.filter(i=>!It(i,r)):It(r,t)?void 0:t}function $E(e,t){return Array.isArray(t)?t.some(n=>It(n,e)):It(t,e)}function mhe(e,t=[],n=!1){const r=t.map((i,a)=>$E(i.value,e)?String(a):void 0).filter(i=>typeof i<"u");return n?r:r[0]}function ghe(e,t,n=[]){const r=Qr(e,n);if(!Wu(r)){const i=n.findIndex(l=>r===l.value),a=n.map(({value:l})=>l);return t.slice(0,i).concat(r,t.slice(i)).sort((l,c)=>+(a.indexOf(l)>a.indexOf(c)))}return t}var yhe=1,bhe=4;function NL(e){return Xu(e,yhe|bhe)}function vhe(e,t,n,r){return r=typeof r=="function"?r:void 0,e==null?e:rE(e,t,n,r)}class _he{constructor(t){this.errorSchema={},this.resetAllErrors(t)}get ErrorSchema(){return this.errorSchema}getOrCreateErrorBlock(t){let r=Array.isArray(t)&&t.length>0||typeof t=="string"?Ne(this.errorSchema,t):this.errorSchema;return!r&&t&&(r={},vhe(this.errorSchema,t,r,Object)),r}resetAllErrors(t){return this.errorSchema=t?NL(t):{},this}addErrors(t,n){const r=this.getOrCreateErrorBlock(n);let i=Ne(r,Jn);return Array.isArray(i)||(i=[],r[Jn]=i),Array.isArray(t)?mn(r,Jn,[...new Set([...i,...t])]):mn(r,Jn,[...new Set([...i,t])]),this}setErrors(t,n){const r=this.getOrCreateErrorBlock(n),i=Array.isArray(t)?[...new Set([...t])]:[t];return mn(r,Jn,i),this}clearErrors(t){const n=this.getOrCreateErrorBlock(t);return mn(n,Jn,[]),this}}function xhe(e,t,n=[1900,new Date().getFullYear()+2],r="YMD"){const{day:i,month:a,year:o,hour:l,minute:c,second:f}=e,d={type:"day",range:[1,31],value:i},h={type:"month",range:[1,12],value:a},m={type:"year",range:n,value:o},g=[];switch(r){case"MDY":g.push(h,d,m);break;case"DMY":g.push(d,h,m);break;case"YMD":default:g.push(m,h,d)}return t&&g.push({type:"hour",range:[0,23],value:l},{type:"minute",range:[0,59],value:c},{type:"second",range:[0,59],value:f}),g}function whe(e){const t={};return e.multipleOf&&(t.step=e.multipleOf),(e.minimum||e.minimum===0)&&(t.min=e.minimum),(e.maximum||e.maximum===0)&&(t.max=e.maximum),t}function She(e,t,n={},r=!0){const i={type:t||"text",...whe(e)};return n.inputType?i.type=n.inputType:t||(e.type==="number"?(i.type="number",r&&i.step===void 0&&(i.step="any")):e.type==="integer"&&(i.type="number",i.step===void 0&&(i.step=1))),n.autocomplete&&(i.autoComplete=n.autocomplete),n.accept&&(i.accept=n.accept),i}const uD={props:{disabled:!1},submitText:"Submit",norender:!1};function Ehe(e={}){const t=ot(e);if(t&&t[cp]){const n=t[cp];return{...uD,...n}}return uD}function yt(e,t,n={}){const{templates:r}=t;return e==="ButtonTemplates"?r[e]:n[e]||r[e]}var Ox={exports:{}},mt={};/**
|
|
238
|
+
* @license React
|
|
239
|
+
* react-is.production.min.js
|
|
240
|
+
*
|
|
241
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
242
|
+
*
|
|
243
|
+
* This source code is licensed under the MIT license found in the
|
|
244
|
+
* LICENSE file in the root directory of this source tree.
|
|
245
|
+
*/var cD;function khe(){if(cD)return mt;cD=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),o=Symbol.for("react.context"),l=Symbol.for("react.server_context"),c=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),h=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),g=Symbol.for("react.offscreen"),v;v=Symbol.for("react.module.reference");function w(b){if(typeof b=="object"&&b!==null){var _=b.$$typeof;switch(_){case e:switch(b=b.type,b){case n:case i:case r:case f:case d:return b;default:switch(b=b&&b.$$typeof,b){case l:case o:case c:case m:case h:case a:return b;default:return _}}case t:return _}}}return mt.ContextConsumer=o,mt.ContextProvider=a,mt.Element=e,mt.ForwardRef=c,mt.Fragment=n,mt.Lazy=m,mt.Memo=h,mt.Portal=t,mt.Profiler=i,mt.StrictMode=r,mt.Suspense=f,mt.SuspenseList=d,mt.isAsyncMode=function(){return!1},mt.isConcurrentMode=function(){return!1},mt.isContextConsumer=function(b){return w(b)===o},mt.isContextProvider=function(b){return w(b)===a},mt.isElement=function(b){return typeof b=="object"&&b!==null&&b.$$typeof===e},mt.isForwardRef=function(b){return w(b)===c},mt.isFragment=function(b){return w(b)===n},mt.isLazy=function(b){return w(b)===m},mt.isMemo=function(b){return w(b)===h},mt.isPortal=function(b){return w(b)===t},mt.isProfiler=function(b){return w(b)===i},mt.isStrictMode=function(b){return w(b)===r},mt.isSuspense=function(b){return w(b)===f},mt.isSuspenseList=function(b){return w(b)===d},mt.isValidElementType=function(b){return typeof b=="string"||typeof b=="function"||b===n||b===i||b===r||b===f||b===d||b===g||typeof b=="object"&&b!==null&&(b.$$typeof===m||b.$$typeof===h||b.$$typeof===a||b.$$typeof===o||b.$$typeof===c||b.$$typeof===v||b.getModuleId!==void 0)},mt.typeOf=w,mt}var fD;function Ahe(){return fD||(fD=1,Ox.exports=khe()),Ox.exports}var The=Ahe();const dD=zn(The),Nx={boolean:{checkbox:"CheckboxWidget",radio:"RadioWidget",select:"SelectWidget",hidden:"HiddenWidget"},string:{text:"TextWidget",password:"PasswordWidget",email:"EmailWidget",hostname:"TextWidget",ipv4:"TextWidget",ipv6:"TextWidget",uri:"URLWidget","data-url":"FileWidget",radio:"RadioWidget",select:"SelectWidget",textarea:"TextareaWidget",hidden:"HiddenWidget",date:"DateWidget",datetime:"DateTimeWidget","date-time":"DateTimeWidget","alt-date":"AltDateWidget","alt-datetime":"AltDateTimeWidget",time:"TimeWidget",color:"ColorWidget",file:"FileWidget"},number:{text:"TextWidget",select:"SelectWidget",updown:"UpDownWidget",range:"RangeWidget",radio:"RadioWidget",hidden:"HiddenWidget"},integer:{text:"TextWidget",select:"SelectWidget",updown:"UpDownWidget",range:"RangeWidget",radio:"RadioWidget",hidden:"HiddenWidget"},array:{select:"SelectWidget",checkboxes:"CheckboxesWidget",files:"FileWidget",hidden:"HiddenWidget"}};function Che(e){let t=Ne(e,"MergedWidget");if(!t){const n=e.defaultProps&&e.defaultProps.options||{};t=({options:r,...i})=>N.jsx(e,{options:{...n,...r},...i}),mn(e,"MergedWidget",t)}return t}function ji(e,t,n={}){const r=Ii(e);if(typeof t=="function"||t&&dD.isForwardRef(te.createElement(t))||dD.isMemo(t))return Che(t);if(typeof t!="string")throw new Error(`Unsupported widget definition: ${typeof t}`);if(t in n){const i=n[t];return ji(e,i,n)}if(typeof r=="string"){if(!(r in Nx))throw new Error(`No widget for type '${r}'`);if(t in Nx[r]){const i=n[Nx[r][t]];return ji(e,i,n)}}throw new Error(`No widget '${t}' for type '${r}'`)}function Ohe(e){let t=0;for(let n=0;n<e.length;n+=1){const r=e.charCodeAt(n);t=(t<<5)-t+r,t=t&t}return t.toString(16)}function Nhe(e){const t=new Set;return JSON.stringify(e,(n,r)=>(t.add(n),r)),Ohe(JSON.stringify(e,Array.from(t).sort()))}function Rhe(e,t,n={}){try{return ji(e,t,n),!0}catch(r){const i=r;if(i.message&&(i.message.startsWith("No widget")||i.message.startsWith("Unsupported widget")))return!1;throw r}}function Bc(e,t){return`${Wp(e)?e:e[Ra]}__${t}`}function Uc(e){return Bc(e,"description")}function RL(e){return Bc(e,"error")}function Xw(e){return Bc(e,"examples")}function jL(e){return Bc(e,"help")}function ML(e){return Bc(e,"title")}function Is(e,t=!1){const n=t?` ${Xw(e)}`:"";return`${RL(e)} ${Uc(e)} ${jL(e)}${n}`}function $L(e,t){return`${e}-${t}`}function jhe(e,t,n){return t?n:e}function Mhe(e){return e?new Date(e).toJSON():void 0}function $he(e,t){if(!Array.isArray(t))return e;const n=d=>d.reduce((h,m)=>(h[m]=!0,h),{}),r=d=>d.length>1?`properties '${d.join("', '")}'`:`property '${d[0]}'`,i=n(e),a=t.filter(d=>d==="*"||i[d]),o=n(a),l=e.filter(d=>!o[d]),c=a.indexOf("*");if(c===-1){if(l.length)throw new Error(`uiSchema order list does not contain ${r(l)}`);return a}if(c!==a.lastIndexOf("*"))throw new Error("uiSchema order list contains more than one wildcard item");const f=[...a];return f.splice(c,1,...l),f}function Rx(e,t=!0){if(!e)return{year:-1,month:-1,day:-1,hour:t?-1:0,minute:t?-1:0,second:t?-1:0};const n=new Date(e);if(Number.isNaN(n.getTime()))throw new Error("Unable to parse date "+e);return{year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate(),hour:t?n.getUTCHours():0,minute:t?n.getUTCMinutes():0,second:t?n.getUTCSeconds():0}}function Rh(e){if(e.const||e.enum&&e.enum.length===1&&e.enum[0]===!0)return!0;if(e.anyOf&&e.anyOf.length===1)return Rh(e.anyOf[0]);if(e.oneOf&&e.oneOf.length===1)return Rh(e.oneOf[0]);if(e.allOf){const t=n=>Rh(n);return e.allOf.some(t)}return!1}function Dhe(e,t,n){const{props:r,state:i}=e;return!It(r,t)||!It(i,n)}function hD(e,t=!0){const{year:n,month:r,day:i,hour:a=0,minute:o=0,second:l=0}=e,c=Date.UTC(n,r-1,i,a,o,l),f=new Date(c).toJSON();return t?f:f.slice(0,10)}function wc(e,t=[]){if(!e)return[];let n=[];return Jn in e&&(n=n.concat(e[Jn].map(r=>{const i=`.${t.join(".")}`;return{property:i,message:r,stack:`${i} ${r}`}}))),Object.keys(e).reduce((r,i)=>{if(i!==Jn){const a=e[i];Ss(a)&&(r=r.concat(wc(a,[...t,i])))}return r},n)}function DL(e){return an(e)?Zp(e,Ns):Ic(e)?[e]:WS(r6(YS(e)))}function Ihe(e){const t=new _he;return e.length&&e.forEach(n=>{const{property:r,message:i}=n,a=r==="."?[]:DL(r);a.length>0&&a[0]===""&&a.splice(0,1),i&&t.addErrors(i,a)}),t.ErrorSchema}function DE(e){return Object.keys(e).reduce((t,n)=>{if(n==="addError")return t;{const r=e[n];return Ss(r)?{...t,[n]:DE(r)}:{...t,[n]:r}}},{})}function Phe(e){if(!e)return"";const t=new Date(e),n=ka(t.getFullYear(),4),r=ka(t.getMonth()+1,2),i=ka(t.getDate(),2),a=ka(t.getHours(),2),o=ka(t.getMinutes(),2),l=ka(t.getSeconds(),2),c=ka(t.getMilliseconds(),3);return`${n}-${r}-${i}T${a}:${o}:${l}.${c}`}function jh(e,t){if(!t)return e;const{errors:n,errorSchema:r}=e;let i=wc(t),a=t;return tl(r)||(a=Oi(r,t,!0),i=[...n].concat(i)),{errorSchema:a,errors:i}}function Lhe(e){for(const t in e){const n=e,r=n[t];t===rn&&typeof r=="string"&&r.startsWith("#")?n[t]=UP+r:n[t]=IE(r)}return e}function zhe(e){for(let t=0;t<e.length;t++)e[t]=IE(e[t]);return e}function IE(e){return Array.isArray(e)?zhe([...e]):Mt(e)?Lhe({...e}):e}function IL(e,t,n){for(var r=-1,i=t.length,a={};++r<i;){var o=t[r],l=Kp(e,o);n(l,o)&&rE(a,cl(o,e),l)}return a}function qhe(e,t){if(e==null)return{};var n=Zp(QS(e),function(r){return[r]});return t=tE(t),IL(e,n,function(r,i){return t(r,i[0])})}var Fhe=200;function Bhe(e,t,n,r){var i=-1,a=M6,o=!0,l=e.length,c=[],f=t.length;if(!l)return c;t.length>=Fhe&&(a=zS,o=!1,t=new Qo(t));e:for(;++i<l;){var d=e[i],h=d;if(d=d!==0?d:0,o&&h===h){for(var m=f;m--;)if(t[m]===h)continue e;c.push(d)}else a(t,h,r)||c.push(d)}return c}var Uhe=iE(function(e,t){return mp(e)?Bhe(e,Lc(t,1,mp,!0)):[]});function Vhe(e,t){const n=Ss(e),r=Ss(t);if(e===t||!n&&!r)return[];if(n&&!r)return Yr(e);if(!n&&r)return Yr(t);{const i=Yr(qhe(e,(o,l)=>!It(o,Ne(t,l)))),a=Uhe(Yr(t),Yr(e));return[...i,...a]}}var Tt;(function(e){e.ArrayItemTitle="Item",e.MissingItems="Missing items definition",e.YesLabel="Yes",e.NoLabel="No",e.CloseLabel="Close",e.ErrorsLabel="Errors",e.NewStringDefault="New Value",e.AddButton="Add",e.AddItemButton="Add Item",e.CopyButton="Copy",e.MoveDownButton="Move down",e.MoveUpButton="Move up",e.RemoveButton="Remove",e.NowLabel="Now",e.ClearLabel="Clear",e.AriaDateLabel="Select a date",e.PreviewLabel="Preview",e.DecrementAriaLabel="Decrease value by 1",e.IncrementAriaLabel="Increase value by 1",e.UnknownFieldType="Unknown field type %1",e.OptionPrefix="Option %1",e.TitleOptionPrefix="%1 option %2",e.KeyLabel="%1 Key",e.InvalidObjectField='Invalid "%1" object field configuration: _%2_.',e.UnsupportedField="Unsupported field schema.",e.UnsupportedFieldWithId="Unsupported field schema for field `%1`.",e.UnsupportedFieldWithReason="Unsupported field schema: _%1_.",e.UnsupportedFieldWithIdAndReason="Unsupported field schema for field `%1`: _%2_.",e.FilesInfo="**%1** (%2, %3 bytes)"})(Tt||(Tt={}));function Hhe(e,t){var n=an(e)?ZS:E6;return n(e,C6(t))}function Ghe(e,t){return IL(e,t,function(n,r){return T6(e,r)})}var pD=y6(function(e,t){return e==null?{}:Ghe(e,t)}),Yhe=0;function Zhe(e){var t=++Yhe;return YS(e)+t}function Ww(){return Zhe("rjsf-array-item-")}function mD(e){return Array.isArray(e)?e.map(t=>({key:Ww(),item:t})):[]}function Ru(e){return Array.isArray(e)?e.map(t=>t.item):[]}class Khe extends te.Component{constructor(n){super(n);De(this,"_getNewFormDataRow",()=>{const{schema:n,registry:r}=this.props,{schemaUtils:i}=r;let a=n.items;return Zw(n)&&Kie(n)&&(a=n.additionalItems),i.getDefaultFormState(a)});De(this,"onAddClick",n=>{this._handleAddClick(n)});De(this,"onAddIndexClick",n=>r=>{this._handleAddClick(r,n)});De(this,"onCopyIndexClick",n=>r=>{r&&r.preventDefault();const{onChange:i,errorSchema:a}=this.props,{keyedFormData:o}=this.state;let l;if(a){l={};for(const d in a){const h=parseInt(d);h<=n?mn(l,[h],a[d]):h>n&&mn(l,[h+1],a[d])}}const c={key:Ww(),item:NL(o[n].item)},f=[...o];n!==void 0?f.splice(n+1,0,c):f.push(c),this.setState({keyedFormData:f,updatedKeyedFormData:!0},()=>i(Ru(f),l))});De(this,"onDropIndexClick",n=>r=>{r&&r.preventDefault();const{onChange:i,errorSchema:a}=this.props,{keyedFormData:o}=this.state;let l;if(a){l={};for(const f in a){const d=parseInt(f);d<n?mn(l,[d],a[f]):d>n&&mn(l,[d-1],a[f])}}const c=o.filter((f,d)=>d!==n);this.setState({keyedFormData:c,updatedKeyedFormData:!0},()=>i(Ru(c),l))});De(this,"onReorderClick",(n,r)=>i=>{i&&(i.preventDefault(),i.currentTarget.blur());const{onChange:a,errorSchema:o}=this.props;let l;if(o){l={};for(const h in o){const m=parseInt(h);m==n?mn(l,[r],o[n]):m==r?mn(l,[n],o[r]):mn(l,[h],o[m])}}const{keyedFormData:c}=this.state;function f(){const h=c.slice();return h.splice(n,1),h.splice(r,0,c[n]),h}const d=f();this.setState({keyedFormData:d},()=>a(Ru(d),l))});De(this,"onChangeForIndex",n=>(r,i,a)=>{const{formData:o,onChange:l,errorSchema:c}=this.props,d=(Array.isArray(o)?o:[]).map((h,m)=>n===m?typeof r>"u"?null:r:h);l(d,c&&c&&{...c,[n]:i},a)});De(this,"onSelectChange",n=>{const{onChange:r,idSchema:i}=this.props;r(n,void 0,i&&i.$id)});const{formData:r=[]}=n,i=mD(r);this.state={keyedFormData:i,updatedKeyedFormData:!1}}static getDerivedStateFromProps(n,r){if(r.updatedKeyedFormData)return{updatedKeyedFormData:!1};const i=Array.isArray(n.formData)?n.formData:[],a=r.keyedFormData||[];return{keyedFormData:i.length===a.length?a.map((l,c)=>({key:l.key,item:i[c]})):mD(i)}}get itemTitle(){const{schema:n,registry:r}=this.props,{translateString:i}=r;return Ne(n,[Ma,"title"],Ne(n,[Ma,"description"],i(Tt.ArrayItemTitle)))}isItemRequired(n){return Array.isArray(n.type)?!n.type.includes("null"):n.type!=="null"}canAddItem(n){const{schema:r,uiSchema:i,registry:a}=this.props;let{addable:o}=ot(i,a.globalUiOptions);return o!==!1&&(r.maxItems!==void 0?o=n.length<r.maxItems:o=!0),o}_handleAddClick(n,r){n&&n.preventDefault();const{onChange:i,errorSchema:a}=this.props,{keyedFormData:o}=this.state;let l;if(a){l={};for(const d in a){const h=parseInt(d);r===void 0||h<r?mn(l,[h],a[d]):h>=r&&mn(l,[h+1],a[d])}}const c={key:Ww(),item:this._getNewFormDataRow()},f=[...o];r!==void 0?f.splice(r,0,c):f.push(c),this.setState({keyedFormData:f,updatedKeyedFormData:!0},()=>i(Ru(f),l))}render(){const{schema:n,uiSchema:r,idSchema:i,registry:a}=this.props,{schemaUtils:o,translateString:l}=a;if(!(Ma in n)){const c=ot(r),f=yt("UnsupportedFieldTemplate",a,c);return N.jsx(f,{schema:n,idSchema:i,reason:l(Tt.MissingItems),registry:a})}return o.isMultiSelect(n)?this.renderMultiSelect():TL(r)?this.renderCustomWidget():Zw(n)?this.renderFixedArray():o.isFilesArray(n,r)?this.renderFiles():this.renderNormalArray()}renderNormalArray(){const{schema:n,uiSchema:r={},errorSchema:i,idSchema:a,name:o,title:l,disabled:c=!1,readonly:f=!1,autofocus:d=!1,required:h=!1,registry:m,onBlur:g,onFocus:v,idPrefix:w,idSeparator:b="_",rawErrors:_}=this.props,{keyedFormData:S}=this.state,x=n.title||l||o,{schemaUtils:A,formContext:k}=m,T=ot(r),O=Mt(n.items)?n.items:{},$=A.retrieveSchema(O),L=Ru(this.state.keyedFormData),M=this.canAddItem(L),z={canAdd:M,items:S.map((q,D)=>{const{key:H,item:B}=q,G=B,K=A.retrieveSchema(O,G),Q=i?i[D]:void 0,R=a.$id+b+D,V=A.toIdSchema(K,R,G,w,b);return this.renderArrayFieldItem({key:H,index:D,name:o&&`${o}-${D}`,title:x?`${x}-${D+1}`:void 0,canAdd:M,canMoveUp:D>0,canMoveDown:D<L.length-1,itemSchema:K,itemIdSchema:V,itemErrorSchema:Q,itemData:G,itemUiSchema:r.items,autofocus:d&&D===0,onBlur:g,onFocus:v,rawErrors:_,totalItems:S.length})}),className:`field field-array field-array-of-${$.type}`,disabled:c,idSchema:a,uiSchema:r,onAddClick:this.onAddClick,readonly:f,required:h,schema:n,title:x,formContext:k,formData:L,rawErrors:_,registry:m},P=yt("ArrayFieldTemplate",m,T);return N.jsx(P,{...z})}renderCustomWidget(){const{schema:n,idSchema:r,uiSchema:i,disabled:a=!1,readonly:o=!1,autofocus:l=!1,required:c=!1,hideError:f,placeholder:d,onBlur:h,onFocus:m,formData:g=[],registry:v,rawErrors:w,name:b}=this.props,{widgets:_,formContext:S,globalUiOptions:x,schemaUtils:A}=v,{widget:k,title:T,...O}=ot(i,x),$=ji(n,k,_),L=T??n.title??b,M=A.getDisplayLabel(n,i,x);return N.jsx($,{id:r.$id,name:b,multiple:!0,onChange:this.onSelectChange,onBlur:h,onFocus:m,options:O,schema:n,uiSchema:i,registry:v,value:g,disabled:a,readonly:o,hideError:f,required:c,label:L,hideLabel:!M,placeholder:d,formContext:S,autofocus:l,rawErrors:w})}renderMultiSelect(){const{schema:n,idSchema:r,uiSchema:i,formData:a=[],disabled:o=!1,readonly:l=!1,autofocus:c=!1,required:f=!1,placeholder:d,onBlur:h,onFocus:m,registry:g,rawErrors:v,name:w}=this.props,{widgets:b,schemaUtils:_,formContext:S,globalUiOptions:x}=g,A=_.retrieveSchema(n.items,a),k=xc(A,i),{widget:T="select",title:O,...$}=ot(i,x),L=ji(n,T,b),M=O??n.title??w,z=_.getDisplayLabel(n,i,x);return N.jsx(L,{id:r.$id,name:w,multiple:!0,onChange:this.onSelectChange,onBlur:h,onFocus:m,options:{...$,enumOptions:k},schema:n,uiSchema:i,registry:g,value:a,disabled:o,readonly:l,required:f,label:M,hideLabel:!z,placeholder:d,formContext:S,autofocus:c,rawErrors:v})}renderFiles(){const{schema:n,uiSchema:r,idSchema:i,name:a,disabled:o=!1,readonly:l=!1,autofocus:c=!1,required:f=!1,onBlur:d,onFocus:h,registry:m,formData:g=[],rawErrors:v}=this.props,{widgets:w,formContext:b,globalUiOptions:_,schemaUtils:S}=m,{widget:x="files",title:A,...k}=ot(r,_),T=ji(n,x,w),O=A??n.title??a,$=S.getDisplayLabel(n,r,_);return N.jsx(T,{options:k,id:i.$id,name:a,multiple:!0,onChange:this.onSelectChange,onBlur:d,onFocus:h,schema:n,uiSchema:r,value:g,disabled:o,readonly:l,required:f,registry:m,formContext:b,autofocus:c,rawErrors:v,label:O,hideLabel:!$})}renderFixedArray(){const{schema:n,uiSchema:r={},formData:i=[],errorSchema:a,idPrefix:o,idSeparator:l="_",idSchema:c,name:f,title:d,disabled:h=!1,readonly:m=!1,autofocus:g=!1,required:v=!1,registry:w,onBlur:b,onFocus:_,rawErrors:S}=this.props,{keyedFormData:x}=this.state;let{formData:A=[]}=this.props;const k=n.title||d||f,T=ot(r),{schemaUtils:O,formContext:$}=w,M=(Mt(n.items)?n.items:[]).map((H,B)=>O.retrieveSchema(H,i[B])),z=Mt(n.additionalItems)?O.retrieveSchema(n.additionalItems,i):null;(!A||A.length<M.length)&&(A=A||[],A=A.concat(new Array(M.length-A.length)));const P=this.canAddItem(A)&&!!z,q={canAdd:P,className:"field field-array field-array-fixed-items",disabled:h,idSchema:c,formData:i,items:x.map((H,B)=>{const{key:G,item:K}=H,Q=K,R=B>=M.length,V=(R&&Mt(n.additionalItems)?O.retrieveSchema(n.additionalItems,Q):M[B])||{},X=c.$id+l+B,j=O.toIdSchema(V,X,Q,o,l),I=R?r.additionalItems||{}:Array.isArray(r.items)?r.items[B]:r.items||{},U=a?a[B]:void 0;return this.renderArrayFieldItem({key:G,index:B,name:f&&`${f}-${B}`,title:k?`${k}-${B+1}`:void 0,canAdd:P,canRemove:R,canMoveUp:B>=M.length+1,canMoveDown:R&&B<A.length-1,itemSchema:V,itemData:Q,itemUiSchema:I,itemIdSchema:j,itemErrorSchema:U,autofocus:g&&B===0,onBlur:b,onFocus:_,rawErrors:S,totalItems:x.length})}),onAddClick:this.onAddClick,readonly:m,required:v,registry:w,schema:n,uiSchema:r,title:k,formContext:$,errorSchema:a,rawErrors:S},D=yt("ArrayFieldTemplate",w,T);return N.jsx(D,{...q})}renderArrayFieldItem(n){const{key:r,index:i,name:a,canAdd:o,canRemove:l=!0,canMoveUp:c,canMoveDown:f,itemSchema:d,itemData:h,itemUiSchema:m,itemIdSchema:g,itemErrorSchema:v,autofocus:w,onBlur:b,onFocus:_,rawErrors:S,totalItems:x,title:A}=n,{disabled:k,hideError:T,idPrefix:O,idSeparator:$,readonly:L,uiSchema:M,registry:z,formContext:P}=this.props,{fields:{ArraySchemaField:q,SchemaField:D},globalUiOptions:H}=z,B=q||D,{orderable:G=!0,removable:K=!0,copyable:Q=!1}=ot(M,H),R={moveUp:G&&c,moveDown:G&&f,copy:Q&&o,remove:K&&l,toolbar:!1};return R.toolbar=Object.keys(R).some(V=>R[V]),{children:N.jsx(B,{name:a,title:A,index:i,schema:d,uiSchema:m,formData:h,formContext:P,errorSchema:v,idPrefix:O,idSeparator:$,idSchema:g,required:this.isItemRequired(d),onChange:this.onChangeForIndex(i),onBlur:b,onFocus:_,registry:z,disabled:k,readonly:L,hideError:T,autofocus:w,rawErrors:S}),className:"array-item",disabled:k,canAdd:o,hasCopy:R.copy,hasToolbar:R.toolbar,hasMoveUp:R.moveUp,hasMoveDown:R.moveDown,hasRemove:R.remove,index:i,totalItems:x,key:r,onAddIndexClick:this.onAddIndexClick,onCopyIndexClick:this.onCopyIndexClick,onDropIndexClick:this.onDropIndexClick,onReorderClick:this.onReorderClick,readonly:L,registry:z,schema:d,uiSchema:m}}}function Xhe(e){const{schema:t,name:n,uiSchema:r,idSchema:i,formData:a,registry:o,required:l,disabled:c,readonly:f,hideError:d,autofocus:h,title:m,onChange:g,onFocus:v,onBlur:w,rawErrors:b}=e,{title:_}=t,{widgets:S,formContext:x,translateString:A,globalUiOptions:k}=o,{widget:T="checkbox",title:O,label:$=!0,...L}=ot(r,k),M=ji(t,T,S),z=A(Tt.YesLabel),P=A(Tt.NoLabel);let q;const D=O??_??m??n;if(Array.isArray(t.oneOf))q=xc({oneOf:t.oneOf.map(H=>{if(Mt(H))return{...H,title:H.title||(H.const===!0?z:P)}}).filter(H=>H)},r);else{const H=t,B=t.enum??[!0,!1];!H.enumNames&&B.length===2&&B.every(G=>typeof G=="boolean")?q=[{value:B[0],label:B[0]?z:P},{value:B[1],label:B[1]?z:P}]:q=xc({enum:B,enumNames:H.enumNames},r)}return N.jsx(M,{options:{...L,enumOptions:q},schema:t,uiSchema:r,id:i.$id,name:n,onChange:g,onFocus:v,onBlur:w,label:D,hideLabel:!$,value:a,required:l,disabled:c,readonly:f,hideError:d,registry:o,formContext:x,autofocus:h,rawErrors:b})}class gD extends te.Component{constructor(n){super(n);De(this,"onOptionChange",n=>{const{selectedOption:r,retrievedOptions:i}=this.state,{formData:a,onChange:o,registry:l}=this.props,{schemaUtils:c}=l,f=n!==void 0?parseInt(n,10):-1;if(f===r)return;const d=f>=0?i[f]:void 0,h=r>=0?i[r]:void 0;let m=c.sanitizeDataForNewSchema(d,h,a);d&&(m=c.getDefaultFormState(d,m,"excludeObjectChildren")),this.setState({selectedOption:f},()=>{o(m,void 0,this.getFieldId())})});const{formData:r,options:i,registry:{schemaUtils:a}}=this.props,o=i.map(l=>a.retrieveSchema(l,r));this.state={retrievedOptions:o,selectedOption:this.getMatchingOption(0,r,o)}}componentDidUpdate(n,r){const{formData:i,options:a,idSchema:o}=this.props,{selectedOption:l}=this.state;let c=this.state;if(!It(n.options,a)){const{registry:{schemaUtils:f}}=this.props,d=a.map(h=>f.retrieveSchema(h,i));c={selectedOption:l,retrievedOptions:d}}if(!It(i,n.formData)&&o.$id===n.idSchema.$id){const{retrievedOptions:f}=c,d=this.getMatchingOption(l,i,f);r&&d!==l&&(c={selectedOption:d,retrievedOptions:f})}c!==this.state&&this.setState(c)}getMatchingOption(n,r,i){const{schema:a,registry:{schemaUtils:o}}=this.props,l=nl(a);return o.getClosestMatchingOption(r,i,n,l)}getFieldId(){const{idSchema:n,schema:r}=this.props;return`${n.$id}${r.oneOf?"__oneof_select":"__anyof_select"}`}render(){const{name:n,disabled:r=!1,errorSchema:i={},formContext:a,onBlur:o,onFocus:l,readonly:c,registry:f,schema:d,uiSchema:h}=this.props,{widgets:m,fields:g,translateString:v,globalUiOptions:w,schemaUtils:b}=f,{SchemaField:_}=g,{selectedOption:S,retrievedOptions:x}=this.state,{widget:A="select",placeholder:k,autofocus:T,autocomplete:O,title:$=d.title,...L}=ot(h,w),M=ji({type:"number"},A,m),z=Ne(i,Jn,[]),P=pp(i,[Jn]),q=b.getDisplayLabel(d,h,w),D=S>=0&&x[S]||null;let H;if(D){const{required:V}=d;H=V?Pi({required:V},D):D}let B=[];tr in d&&h&&tr in h?Array.isArray(h[tr])?B=h[tr]:console.warn(`uiSchema.oneOf is not an array for "${$||n}"`):Mr in d&&h&&Mr in h&&(Array.isArray(h[Mr])?B=h[Mr]:console.warn(`uiSchema.anyOf is not an array for "${$||n}"`));let G=h;S>=0&&B.length>S&&(G=B[S]);const K=$?Tt.TitleOptionPrefix:Tt.OptionPrefix,Q=$?[$]:[],R=x.map((V,X)=>{const{title:j=V.title}=ot(B[X]);return{label:j||v(K,Q.concat(String(X+1))),value:X}});return N.jsxs("div",{className:"panel panel-default panel-body",children:[N.jsx("div",{className:"form-group",children:N.jsx(M,{id:this.getFieldId(),name:`${n}${d.oneOf?"__oneof_select":"__anyof_select"}`,schema:{type:"number",default:0},onChange:this.onOptionChange,onBlur:o,onFocus:l,disabled:r||tl(R),multiple:!1,rawErrors:z,errorSchema:P,value:S>=0?S:void 0,options:{enumOptions:R,...L},registry:f,formContext:a,placeholder:k,autocomplete:O,autofocus:T,label:$??n,hideLabel:!q,readonly:c})}),H&&H.type!=="null"&&N.jsx(_,{...this.props,schema:H,uiSchema:G})]})}}const Whe=/\.([0-9]*0)*$/,Qhe=/[0.]0*$/;function Jhe(e){const{registry:t,onChange:n,formData:r,value:i}=e,[a,o]=te.useState(i),{StringField:l}=t.fields;let c=r;const f=te.useCallback((d,h,m)=>{o(d),`${d}`.charAt(0)==="."&&(d=`0${d}`);const g=typeof d=="string"&&d.match(Whe)?TR(d.replace(Qhe,"")):TR(d);n(g,h,m)},[n]);if(typeof a=="string"&&typeof c=="number"){const d=new RegExp(`^(${String(c).replace(".","\\.")})?\\.?0*$`);a.match(d)&&(c=a)}return N.jsx(l,{...e,formData:c,onChange:f})}function ds(){return ds=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ds.apply(this,arguments)}const epe=["children","options"],yD=["allowFullScreen","allowTransparency","autoComplete","autoFocus","autoPlay","cellPadding","cellSpacing","charSet","classId","colSpan","contentEditable","contextMenu","crossOrigin","encType","formAction","formEncType","formMethod","formNoValidate","formTarget","frameBorder","hrefLang","inputMode","keyParams","keyType","marginHeight","marginWidth","maxLength","mediaGroup","minLength","noValidate","radioGroup","readOnly","rowSpan","spellCheck","srcDoc","srcLang","srcSet","tabIndex","useMap"].reduce((e,t)=>(e[t.toLowerCase()]=t,e),{class:"className",for:"htmlFor"}),bD={amp:"&",apos:"'",gt:">",lt:"<",nbsp:" ",quot:"“"},tpe=["style","script","pre"],npe=["src","href","data","formAction","srcDoc","action"],rpe=/([-A-Z0-9_:]+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|(?:\{((?:\\.|{[^}]*?}|[^}])*)\})))?/gi,ipe=/mailto:/i,ape=/\n{2,}$/,vD=/^(\s*>[\s\S]*?)(?=\n\n|$)/,spe=/^ *> ?/gm,ope=/^(?:\[!([^\]]*)\]\n)?([\s\S]*)/,lpe=/^ {2,}\n/,upe=/^(?:( *[-*_])){3,} *(?:\n *)+\n/,_D=/^(?: {1,3})?(`{3,}|~{3,}) *(\S+)? *([^\n]*?)?\n([\s\S]*?)(?:\1\n?|$)/,xD=/^(?: {4}[^\n]+\n*)+(?:\n *)+\n?/,cpe=/^(`+)((?:\\`|(?!\1)`|[^`])+)\1/,fpe=/^(?:\n *)*\n/,dpe=/\r\n?/g,hpe=/^\[\^([^\]]+)](:(.*)((\n+ {4,}.*)|(\n(?!\[\^).+))*)/,ppe=/^\[\^([^\]]+)]/,mpe=/\f/g,gpe=/^---[ \t]*\n(.|\n)*\n---[ \t]*\n/,ype=/^\s*?\[(x|\s)\]/,wD=/^ *(#{1,6}) *([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,SD=/^ *(#{1,6}) +([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,ED=/^([^\n]+)\n *(=|-){3,} *\n/,jx=/^ *(?!<[a-z][^ >/]* ?\/>)<([a-z][^ >/]*) ?((?:[^>]*[^/])?)>\n?(\s*(?:<\1[^>]*?>[\s\S]*?<\/\1>|(?!<\1\b)[\s\S])*?)<\/\1>(?!<\/\1>)\n*/i,bpe=/&([a-z0-9]+|#[0-9]{1,6}|#x[0-9a-fA-F]{1,6});/gi,kD=/^<!--[\s\S]*?(?:-->)/,vpe=/^(data|aria|x)-[a-z_][a-z\d_.-]*$/,Mx=/^ *<([a-z][a-z0-9:]*)(?:\s+((?:<.*?>|[^>])*))?\/?>(?!<\/\1>)(\s*\n)?/i,_pe=/^\{.*\}$/,xpe=/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,wpe=/^<([^ >]+@[^ >]+)>/,Spe=/^<([^ >]+:\/[^ >]+)>/,Epe=/-([a-z])?/gi,AD=/^(\|.*)\n(?: *(\|? *[-:]+ *\|[-| :]*)\n((?:.*\|.*\n)*))?\n?/,kpe=/^[^\n]+(?: \n|\n{2,})/,Ape=/^\[([^\]]*)\]:\s+<?([^\s>]+)>?\s*("([^"]*)")?/,Tpe=/^!\[([^\]]*)\] ?\[([^\]]*)\]/,Cpe=/^\[([^\]]*)\] ?\[([^\]]*)\]/,Ope=/(\n|^[-*]\s|^#|^ {2,}|^-{2,}|^>\s)/,Npe=/\t/g,Rpe=/(^ *\||\| *$)/g,jpe=/^ *:-+: *$/,Mpe=/^ *:-+ *$/,$pe=/^ *-+: *$/,fm=e=>`(?=[\\s\\S]+?\\1${e?"\\1":""})`,dm="((?:\\[.*?\\][([].*?[)\\]]|<.*?>(?:.*?<.*?>)?|`.*?`|\\\\\\1|[\\s\\S])+?)",Dpe=RegExp(`^([*_])\\1${fm(1)}${dm}\\1\\1(?!\\1)`),Ipe=RegExp(`^([*_])${fm(0)}${dm}\\1(?!\\1)`),Ppe=RegExp(`^(==)${fm(0)}${dm}\\1`),Lpe=RegExp(`^(~~)${fm(0)}${dm}\\1`),zpe=/^(:[a-zA-Z0-9-_]+:)/,qpe=/^\\([^0-9A-Za-z\s])/,Fpe=/\\([^0-9A-Za-z\s])/g,Bpe=/^[\s\S](?:(?! \n|[0-9]\.|http)[^=*_~\-\n:<`\\\[!])*/,Upe=/^\n+/,Vpe=/^([ \t]*)/,Hpe=/(?:^|\n)( *)$/,PE="(?:\\d+\\.)",LE="(?:[*+-])";function PL(e){return"( *)("+(e===1?PE:LE)+") +"}const LL=PL(1),zL=PL(2);function qL(e){return RegExp("^"+(e===1?LL:zL))}const Gpe=qL(1),Ype=qL(2);function FL(e){return RegExp("^"+(e===1?LL:zL)+"[^\\n]*(?:\\n(?!\\1"+(e===1?PE:LE)+" )[^\\n]*)*(\\n|$)","gm")}const Zpe=FL(1),Kpe=FL(2);function BL(e){const t=e===1?PE:LE;return RegExp("^( *)("+t+") [\\s\\S]+?(?:\\n{2,}(?! )(?!\\1"+t+" (?!"+t+" ))\\n*|\\s*\\n*$)")}const UL=BL(1),VL=BL(2);function TD(e,t){const n=t===1,r=n?UL:VL,i=n?Zpe:Kpe,a=n?Gpe:Ype;return{t:o=>a.test(o),o:il(function(o,l){const c=Hpe.exec(l.prevCapture);return c&&(l.list||!l.inline&&!l.simple)?r.exec(o=c[1]+o):null}),i:1,u(o,l,c){const f=n?+o[2]:void 0,d=o[0].replace(ape,`
|
|
246
|
+
`).match(i);let h=!1;return{items:d.map(function(m,g){const v=a.exec(m)[0].length,w=RegExp("^ {1,"+v+"}","gm"),b=m.replace(w,"").replace(a,""),_=g===d.length-1,S=b.indexOf(`
|
|
247
|
+
|
|
248
|
+
`)!==-1||_&&h;h=S;const x=c.inline,A=c.list;let k;c.list=!0,S?(c.inline=!1,k=Qu(b)+`
|
|
249
|
+
|
|
250
|
+
`):(c.inline=!0,k=Qu(b));const T=l(k,c);return c.inline=x,c.list=A,T}),ordered:n,start:f}},l:(o,l,c)=>e(o.ordered?"ol":"ul",{key:c.key,start:o.type==="20"?o.start:void 0},o.items.map(function(f,d){return e("li",{key:d},l(f,c))}))}}const Xpe=RegExp(`^\\[((?:\\[[^\\[\\]]*(?:\\[[^\\[\\]]*\\][^\\[\\]]*)*\\]|[^\\[\\]])*)\\]\\(\\s*<?((?:\\([^)]*\\)|[^\\s\\\\]|\\\\.)*?)>?(?:\\s+['"]([\\s\\S]*?)['"])?\\s*\\)`),Wpe=/^!\[(.*?)\]\( *((?:\([^)]*\)|[^() ])*) *"?([^)"]*)?"?\)/;function Qu(e){let t=e.length;for(;t>0&&e[t-1]<=" ";)t--;return e.slice(0,t)}function Mh(e,t){return e.startsWith(t)}function Qpe(e,t,n){if(Array.isArray(n)){for(let r=0;r<n.length;r++)if(Mh(e,n[r]))return!0;return!1}return n(e,t)}function ju(e){return e.replace(/[ÀÁÂÃÄÅàáâãä忯]/g,"a").replace(/[çÇ]/g,"c").replace(/[ðÐ]/g,"d").replace(/[ÈÉÊËéèêë]/g,"e").replace(/[ÏïÎîÍíÌì]/g,"i").replace(/[Ññ]/g,"n").replace(/[øØœŒÕõÔôÓóÒò]/g,"o").replace(/[ÜüÛûÚúÙù]/g,"u").replace(/[ŸÿÝý]/g,"y").replace(/[^a-z0-9- ]/gi,"").replace(/ /gi,"-").toLowerCase()}function Jpe(e){return $pe.test(e)?"right":jpe.test(e)?"center":Mpe.test(e)?"left":null}function CD(e,t,n,r){const i=n.inTable;n.inTable=!0;let a=[[]],o="";function l(){if(!o)return;const c=a[a.length-1];c.push.apply(c,t(o,n)),o=""}return e.trim().split(/(`[^`]*`|\\\||\|)/).filter(Boolean).forEach((c,f,d)=>{c.trim()==="|"&&(l(),r)?f!==0&&f!==d.length-1&&a.push([]):o+=c}),l(),n.inTable=i,a}function eme(e,t,n){n.inline=!0;const r=e[2]?e[2].replace(Rpe,"").split("|").map(Jpe):[],i=e[3]?function(o,l,c){return o.trim().split(`
|
|
251
|
+
`).map(function(f){return CD(f,l,c,!0)})}(e[3],t,n):[],a=CD(e[1],t,n,!!i.length);return n.inline=!1,i.length?{align:r,cells:i,header:a,type:"25"}:{children:a,type:"21"}}function OD(e,t){return e.align[t]==null?{}:{textAlign:e.align[t]}}function il(e){return e.inline=1,e}function wa(e){return il(function(t,n){return n.inline?e.exec(t):null})}function Sa(e){return il(function(t,n){return n.inline||n.simple?e.exec(t):null})}function Ei(e){return function(t,n){return n.inline||n.simple?null:e.exec(t)}}function $d(e){return il(function(t){return e.exec(t)})}const tme=/(javascript|vbscript|data(?!:image)):/i;function nme(e){try{const t=decodeURIComponent(e).replace(/[^A-Za-z0-9/:]/g,"");if(tme.test(t))return null}catch{return null}return e}function Hr(e){return e&&e.replace(Fpe,"$1")}function $h(e,t,n){const r=n.inline||!1,i=n.simple||!1;n.inline=!0,n.simple=!0;const a=e(t,n);return n.inline=r,n.simple=i,a}function rme(e,t,n){const r=n.inline||!1,i=n.simple||!1;n.inline=!1,n.simple=!0;const a=e(t,n);return n.inline=r,n.simple=i,a}function ime(e,t,n){const r=n.inline||!1;n.inline=!1;const i=e(t,n);return n.inline=r,i}const $x=(e,t,n)=>({children:$h(t,e[2],n)});function Dx(){return{}}function Ix(){return null}function ame(...e){return e.filter(Boolean).join(" ")}function Px(e,t,n){let r=e;const i=t.split(".");for(;i.length&&(r=r[i[0]],r!==void 0);)i.shift();return r||n}function sme(e="",t={}){t.overrides=t.overrides||{},t.namedCodesToUnicode=t.namedCodesToUnicode?ds({},bD,t.namedCodesToUnicode):bD;const n=t.slugify||ju,r=t.sanitizer||nme,i=t.createElement||te.createElement,a=[vD,_D,xD,t.enforceAtxHeadings?SD:wD,ED,AD,UL,VL],o=[...a,kpe,jx,kD,Mx];function l(_,S,...x){const A=Px(t.overrides,_+".props",{});return i(function(k,T){const O=Px(T,k);return O?typeof O=="function"||typeof O=="object"&&"render"in O?O:Px(T,k+".component",k):k}(_,t.overrides),ds({},S,A,{className:ame(S==null?void 0:S.className,A.className)||void 0}),...x)}function c(_){_=_.replace(gpe,"");let S=!1;t.forceInline?S=!0:t.forceBlock||(S=Ope.test(_)===!1);const x=v(g(S?_:Qu(_).replace(Upe,"")+`
|
|
252
|
+
|
|
253
|
+
`,{inline:S}));for(;typeof x[x.length-1]=="string"&&!x[x.length-1].trim();)x.pop();if(t.wrapper===null)return x;const A=t.wrapper||(S?"span":"div");let k;if(x.length>1||t.forceWrapper)k=x;else{if(x.length===1)return k=x[0],typeof k=="string"?l("span",{key:"outer"},k):k;k=null}return i(A,{key:"outer"},k)}function f(_,S){if(!S||!S.trim())return null;const x=S.match(rpe);return x?x.reduce(function(A,k){const T=k.indexOf("=");if(T!==-1){const O=function(z){return z.indexOf("-")!==-1&&z.match(vpe)===null&&(z=z.replace(Epe,function(P,q){return q.toUpperCase()})),z}(k.slice(0,T)).trim(),$=function(z){const P=z[0];return(P==='"'||P==="'")&&z.length>=2&&z[z.length-1]===P?z.slice(1,-1):z}(k.slice(T+1).trim()),L=yD[O]||O;if(L==="ref")return A;const M=A[L]=function(z,P,q,D){return P==="style"?function(H){const B=[];let G="",K=!1,Q=!1,R="";if(!H)return B;for(let X=0;X<H.length;X++){const j=H[X];if(j!=='"'&&j!=="'"||K||(Q?j===R&&(Q=!1,R=""):(Q=!0,R=j)),j==="("&&G.endsWith("url")?K=!0:j===")"&&K&&(K=!1),j!==";"||Q||K)G+=j;else{const I=G.trim();if(I){const U=I.indexOf(":");if(U>0){const Y=I.slice(0,U).trim(),ne=I.slice(U+1).trim();B.push([Y,ne])}}G=""}}const V=G.trim();if(V){const X=V.indexOf(":");if(X>0){const j=V.slice(0,X).trim(),I=V.slice(X+1).trim();B.push([j,I])}}return B}(q).reduce(function(H,[B,G]){return H[B.replace(/(-[a-z])/g,K=>K[1].toUpperCase())]=D(G,z,B),H},{}):npe.indexOf(P)!==-1?D(Hr(q),z,P):(q.match(_pe)&&(q=Hr(q.slice(1,q.length-1))),q==="true"||q!=="false"&&q)}(_,O,$,r);typeof M=="string"&&(jx.test(M)||Mx.test(M))&&(A[L]=c(M.trim()))}else k!=="style"&&(A[yD[k]||k]=!0);return A},{}):null}const d=[],h={},m={0:{t:[">"],o:Ei(vD),i:1,u(_,S,x){const[,A,k]=_[0].replace(spe,"").match(ope);return{alert:A,children:S(k,x)}},l(_,S,x){const A={key:x.key};return _.alert&&(A.className="markdown-alert-"+n(_.alert.toLowerCase(),ju),_.children.unshift({attrs:{},children:[{type:"27",text:_.alert}],noInnerParse:!0,type:"11",tag:"header"})),l("blockquote",A,S(_.children,x))}},1:{o:$d(lpe),i:1,u:Dx,l:(_,S,x)=>l("br",{key:x.key})},2:{t:_=>{const S=_[0];return S==="-"||S==="*"||S==="_"},o:Ei(upe),i:1,u:Dx,l:(_,S,x)=>l("hr",{key:x.key})},3:{t:[" "],o:Ei(xD),i:0,u:_=>({lang:void 0,text:Hr(Qu(_[0].replace(/^ {4}/gm,"")))}),l:(_,S,x)=>l("pre",{key:x.key},l("code",ds({},_.attrs,{className:_.lang?"lang-"+_.lang:""}),_.text))},4:{t:["```","~~~"],o:Ei(_D),i:0,u:_=>({attrs:f("code",_[3]||""),lang:_[2]||void 0,text:_[4],type:"3"})},5:{t:["`"],o:Sa(cpe),i:3,u:_=>({text:Hr(_[2])}),l:(_,S,x)=>l("code",{key:x.key},_.text)},6:{t:["[^"],o:Ei(hpe),i:0,u:_=>(d.push({footnote:_[2],identifier:_[1]}),{}),l:Ix},7:{t:["[^"],o:wa(ppe),i:1,u:_=>({target:"#"+n(_[1],ju),text:_[1]}),l:(_,S,x)=>l("a",{key:x.key,href:r(_.target,"a","href")},l("sup",{key:x.key},_.text))},8:{t:["[ ]","[x]"],o:wa(ype),i:1,u:_=>({completed:_[1].toLowerCase()==="x"}),l:(_,S,x)=>l("input",{checked:_.completed,key:x.key,readOnly:!0,type:"checkbox"})},9:{t:["#"],o:Ei(t.enforceAtxHeadings?SD:wD),i:1,u:(_,S,x)=>({children:$h(S,_[2],x),id:n(_[2],ju),level:_[1].length}),l:(_,S,x)=>l("h"+_.level,{id:_.id,key:x.key},S(_.children,x))},10:{o:Ei(ED),i:0,u:(_,S,x)=>({children:$h(S,_[1],x),level:_[2]==="="?1:2,type:"9"})},11:{t:["<"],o:$d(jx),i:1,u(_,S,x){const[,A]=_[3].match(Vpe),k=RegExp("^"+A,"gm"),T=_[3].replace(k,""),O=($=T,o.some(q=>q.test($))?ime:$h);var $;const L=_[1].toLowerCase(),M=tpe.indexOf(L)!==-1,z=(M?L:_[1]).trim(),P={attrs:f(z,_[2]),noInnerParse:M,tag:z};if(x.inAnchor=x.inAnchor||L==="a",M)P.text=_[3];else{const q=x.inHTML;x.inHTML=!0,P.children=O(S,T,x),x.inHTML=q}return x.inAnchor=!1,P},l:(_,S,x)=>l(_.tag,ds({key:x.key},_.attrs),_.text||(_.children?S(_.children,x):""))},13:{t:["<"],o:$d(Mx),i:1,u(_){const S=_[1].trim();return{attrs:f(S,_[2]||""),tag:S}},l:(_,S,x)=>l(_.tag,ds({},_.attrs,{key:x.key}))},12:{t:["<!--"],o:$d(kD),i:1,u:()=>({}),l:Ix},14:{t:["!["],o:Sa(Wpe),i:1,u:_=>({alt:Hr(_[1]),target:Hr(_[2]),title:Hr(_[3])}),l:(_,S,x)=>l("img",{key:x.key,alt:_.alt||void 0,title:_.title||void 0,src:r(_.target,"img","src")})},15:{t:["["],o:wa(Xpe),i:3,u:(_,S,x)=>({children:rme(S,_[1],x),target:Hr(_[2]),title:Hr(_[3])}),l:(_,S,x)=>l("a",{key:x.key,href:r(_.target,"a","href"),title:_.title},S(_.children,x))},16:{t:["<"],o:wa(Spe),i:0,u:_=>({children:[{text:_[1],type:"27"}],target:_[1],type:"15"})},17:{t:(_,S)=>!S.inAnchor&&!t.disableAutoLink&&(Mh(_,"http://")||Mh(_,"https://")),o:wa(xpe),i:0,u:_=>({children:[{text:_[1],type:"27"}],target:_[1],title:void 0,type:"15"})},18:{t:["<"],o:wa(wpe),i:0,u(_){let S=_[1],x=_[1];return ipe.test(x)||(x="mailto:"+x),{children:[{text:S.replace("mailto:",""),type:"27"}],target:x,type:"15"}}},20:TD(l,1),33:TD(l,2),19:{o:Ei(fpe),i:3,u:Dx,l:()=>`
|
|
254
|
+
`},21:{o:il(function(_,S){if(S.inline||S.simple||S.inHTML&&_.indexOf(`
|
|
255
|
+
|
|
256
|
+
`)===-1&&S.prevCapture.indexOf(`
|
|
257
|
+
|
|
258
|
+
`)===-1)return null;let x="";_.split(`
|
|
259
|
+
`).every(k=>(k+=`
|
|
260
|
+
`,!a.some(T=>T.test(k))&&(x+=k,!!k.trim())));const A=Qu(x);return A===""?null:[x,,A]}),i:3,u:$x,l:(_,S,x)=>l("p",{key:x.key},S(_.children,x))},22:{t:["["],o:wa(Ape),i:0,u:_=>(h[_[1]]={target:_[2],title:_[4]},{}),l:Ix},23:{t:["!["],o:Sa(Tpe),i:0,u:_=>({alt:_[1]?Hr(_[1]):void 0,ref:_[2]}),l:(_,S,x)=>h[_.ref]?l("img",{key:x.key,alt:_.alt,src:r(h[_.ref].target,"img","src"),title:h[_.ref].title}):null},24:{t:_=>_[0]==="["&&_.indexOf("](")===-1,o:wa(Cpe),i:0,u:(_,S,x)=>({children:S(_[1],x),fallbackChildren:_[0],ref:_[2]}),l:(_,S,x)=>h[_.ref]?l("a",{key:x.key,href:r(h[_.ref].target,"a","href"),title:h[_.ref].title},S(_.children,x)):l("span",{key:x.key},_.fallbackChildren)},25:{t:["|"],o:Ei(AD),i:1,u:eme,l(_,S,x){const A=_;return l("table",{key:x.key},l("thead",null,l("tr",null,A.header.map(function(k,T){return l("th",{key:T,style:OD(A,T)},S(k,x))}))),l("tbody",null,A.cells.map(function(k,T){return l("tr",{key:T},k.map(function(O,$){return l("td",{key:$,style:OD(A,$)},S(O,x))}))})))}},27:{o:il(function(_,S){let x;return Mh(_,":")&&(x=zpe.exec(_)),x||Bpe.exec(_)}),i:4,u(_){const S=_[0];return{text:S.indexOf("&")===-1?S:S.replace(bpe,(x,A)=>t.namedCodesToUnicode[A]||x)}},l:_=>_.text},28:{t:["**","__"],o:Sa(Dpe),i:2,u:(_,S,x)=>({children:S(_[2],x)}),l:(_,S,x)=>l("strong",{key:x.key},S(_.children,x))},29:{t:_=>{const S=_[0];return(S==="*"||S==="_")&&_[1]!==S},o:Sa(Ipe),i:3,u:(_,S,x)=>({children:S(_[2],x)}),l:(_,S,x)=>l("em",{key:x.key},S(_.children,x))},30:{t:["\\"],o:Sa(qpe),i:1,u:_=>({text:_[1],type:"27"})},31:{t:["=="],o:Sa(Ppe),i:3,u:$x,l:(_,S,x)=>l("mark",{key:x.key},S(_.children,x))},32:{t:["~~"],o:Sa(Lpe),i:3,u:$x,l:(_,S,x)=>l("del",{key:x.key},S(_.children,x))}};t.disableParsingRawHTML===!0&&(delete m[11],delete m[13]);const g=function(_){var S=Object.keys(_);function x(A,k){var T=[];if(k.prevCapture=k.prevCapture||"",A.trim())for(;A;)for(var O=0;O<S.length;){var $=S[O],L=_[$];if(!L.t||Qpe(A,k,L.t)){var M=L.o(A,k);if(M&&M[0]){A=A.substring(M[0].length);var z=L.u(M,x,k);k.prevCapture+=M[0],z.type||(z.type=$),T.push(z);break}O++}else O++}return k.prevCapture="",T}return S.sort(function(A,k){return _[A].i-_[k].i||(A<k?-1:1)}),function(A,k){return x(function(T){return T.replace(dpe,`
|
|
261
|
+
`).replace(mpe,"").replace(Npe," ")}(A),k)}}(m),v=(w=function(_,S){return function(x,A,k){const T=_[x.type].l;return S?S(()=>T(x,A,k),x,A,k):T(x,A,k)}}(m,t.renderRule),function _(S,x={}){if(Array.isArray(S)){const A=x.key,k=[];let T=!1;for(let O=0;O<S.length;O++){x.key=O;const $=_(S[O],x),L=typeof $=="string";L&&T?k[k.length-1]+=$:$!==null&&k.push($),T=L}return x.key=A,k}return w(S,_,x)});var w;const b=c(e);return d.length?l("div",null,b,l("footer",{key:"footer"},d.map(function(_){return l("div",{id:n(_.identifier,ju),key:_.identifier},_.identifier,v(g(_.footnote,{inline:!0})))}))):b}const hm=e=>{let{children:t="",options:n}=e,r=function(i,a){if(i==null)return{};var o,l,c={},f=Object.keys(i);for(l=0;l<f.length;l++)a.indexOf(o=f[l])>=0||(c[o]=i[o]);return c}(e,epe);return te.cloneElement(sme(t,n),r)};function ome(e,t){return e==null?!0:p6(e,t)}class lme extends te.Component{constructor(){super(...arguments);De(this,"state",{wasPropertyKeyModified:!1,additionalProperties:{}});De(this,"onPropertyChange",(n,r=!1)=>(i,a,o)=>{const{formData:l,onChange:c,errorSchema:f}=this.props;i===void 0&&r&&(i="");const d={...l,[n]:i};c(d,f&&f&&{...f,[n]:a},o)});De(this,"onDropPropertyClick",n=>r=>{r.preventDefault();const{onChange:i,formData:a}=this.props,o={...a};ome(o,n),i(o)});De(this,"getAvailableKey",(n,r)=>{const{uiSchema:i,registry:a}=this.props,{duplicateKeySuffixSeparator:o="-"}=ot(i,a.globalUiOptions);let l=0,c=n;for(;An(r,c);)c=`${n}${o}${++l}`;return c});De(this,"onKeyChange",n=>(r,i)=>{if(n===r)return;const{formData:a,onChange:o,errorSchema:l}=this.props;r=this.getAvailableKey(r,a);const c={...a},f={[n]:r},d=Object.keys(c).map(m=>({[f[m]||m]:c[m]})),h=Object.assign({},...d);this.setState({wasPropertyKeyModified:!0}),o(h,l&&l&&{...l,[r]:i})});De(this,"handleAddClick",n=>()=>{if(!n.additionalProperties)return;const{formData:r,onChange:i,registry:a}=this.props,o={...r};let l,c,f;if(Mt(n.additionalProperties)){l=n.additionalProperties.type,c=n.additionalProperties.const,f=n.additionalProperties.default;let m=n.additionalProperties;if(rn in m){const{schemaUtils:g}=a;m=g.retrieveSchema({$ref:m[rn]},r),l=m.type,c=m.const,f=m.default}!l&&(Mr in m||tr in m)&&(l="object")}const d=this.getAvailableKey("newKey",o),h=c??f??this.getDefaultValue(l);mn(o,d,h),i(o)})}isRequired(n){const{schema:r}=this.props;return Array.isArray(r.required)&&r.required.indexOf(n)!==-1}getDefaultValue(n){const{registry:{translateString:r}}=this.props;switch(n){case"array":return[];case"boolean":return!1;case"null":return null;case"number":return 0;case"object":return{};case"string":default:return r(Tt.NewStringDefault)}}render(){const{schema:n,uiSchema:r={},formData:i,errorSchema:a,idSchema:o,name:l,required:c=!1,disabled:f,readonly:d,hideError:h,idPrefix:m,idSeparator:g,onBlur:v,onFocus:w,registry:b,title:_}=this.props,{fields:S,formContext:x,schemaUtils:A,translateString:k,globalUiOptions:T}=b,{SchemaField:O}=S,$=A.retrieveSchema(n,i),L=ot(r,T),{properties:M={}}=$,z=L.title??$.title??_??l,P=L.description??$.description;let q;try{const B=Object.keys(M);q=$he(B,L.order)}catch(B){return N.jsxs("div",{children:[N.jsx("p",{className:"config-error",style:{color:"red"},children:N.jsx(hm,{options:{disableParsingRawHTML:!0},children:k(Tt.InvalidObjectField,[l||"root",B.message])})}),N.jsx("pre",{children:JSON.stringify($)})]})}const D=yt("ObjectFieldTemplate",b,L),H={title:L.label===!1?"":z,description:L.label===!1?void 0:P,properties:q.map(B=>{const G=An($,[Bt,B,Mc]),K=G?r.additionalProperties:r[B],Q=ot(K).widget==="hidden",R=Ne(o,[B],{});return{content:N.jsx(O,{name:B,required:this.isRequired(B),schema:Ne($,[Bt,B],{}),uiSchema:K,errorSchema:Ne(a,B),idSchema:R,idPrefix:m,idSeparator:g,formData:Ne(i,B),formContext:x,wasPropertyKeyModified:this.state.wasPropertyKeyModified,onKeyChange:this.onKeyChange(B),onChange:this.onPropertyChange(B,G),onBlur:v,onFocus:w,registry:b,disabled:f,readonly:d,hideError:h,onDropPropertyClick:this.onDropPropertyClick},B),name:B,readonly:d,disabled:f,required:c,hidden:Q}}),readonly:d,disabled:f,required:c,idSchema:o,uiSchema:r,errorSchema:a,schema:$,formData:i,formContext:x,registry:b};return N.jsx(D,{...H,onAddClick:this.handleAddClick})}}const ume={array:"ArrayField",boolean:"BooleanField",integer:"NumberField",number:"NumberField",object:"ObjectField",string:"StringField",null:"NullField"};function cme(e,t,n,r){const i=t.field,{fields:a,translateString:o}=r;if(typeof i=="function")return i;if(typeof i=="string"&&i in a)return a[i];const l=Ii(e),c=Array.isArray(l)?l[0]:l||"",f=e.$id;let d=ume[c];return f&&f in a&&(d=f),!d&&(e.anyOf||e.oneOf)?()=>null:d in a?a[d]:()=>{const h=yt("UnsupportedFieldTemplate",r,t);return N.jsx(h,{schema:e,idSchema:n,reason:o(Tt.UnknownFieldType,[String(e.type)]),registry:r})}}function fme(e){const{schema:t,idSchema:n,uiSchema:r,formData:i,errorSchema:a,idPrefix:o,idSeparator:l,name:c,onChange:f,onKeyChange:d,onDropPropertyClick:h,required:m,registry:g,wasPropertyKeyModified:v=!1}=e,{formContext:w,schemaUtils:b,globalUiOptions:_}=g,S=ot(r,_),x=yt("FieldTemplate",g,S),A=yt("DescriptionFieldTemplate",g,S),k=yt("FieldHelpTemplate",g,S),T=yt("FieldErrorTemplate",g,S),O=b.retrieveSchema(t,i),$=n[Ra],L=Oi(b.toIdSchema(O,$,i,o,l),n),M=te.useCallback((me,xe,we)=>f(me,xe,we||$),[$,f]),z=cme(O,S,L,g),P=!!(S.disabled??e.disabled),q=!!(S.readonly??(e.readonly||e.schema.readOnly||O.readOnly)),D=S.hideError,H=D===void 0?e.hideError:!!D,B=!!(S.autofocus??e.autofocus);if(Object.keys(O).length===0)return null;const G=b.getDisplayLabel(O,r,_),{__errors:K,...Q}=a||{},R=pp(r,["ui:classNames","classNames","ui:style"]);Zu in R&&(R[Zu]=pp(R[Zu],["classNames","style"]));const V=N.jsx(z,{...e,onChange:M,idSchema:L,schema:O,uiSchema:R,disabled:P,readonly:q,hideError:H,autofocus:B,errorSchema:Q,formContext:w,rawErrors:K}),X=L[Ra];let j;v?j=c:j=Mc in O?c:S.title||e.schema.title||O.title||e.title||c;const I=S.description||e.schema.description||O.description||"",U=S.enableMarkdownInDescription?N.jsx(hm,{options:{disableParsingRawHTML:!0},children:I}):I,Y=S.help,ne=S.widget==="hidden",ae=["form-group","field",`field-${Ii(O)}`];!H&&K&&K.length>0&&ae.push("field-error has-error has-danger"),r!=null&&r.classNames&&ae.push(r.classNames),S.classNames&&ae.push(S.classNames);const re=N.jsx(k,{help:Y,idSchema:L,schema:O,uiSchema:r,hasErrors:!H&&K&&K.length>0,registry:g}),le=H||(O.anyOf||O.oneOf)&&!b.isSelect(O)?void 0:N.jsx(T,{errors:K,errorSchema:a,idSchema:L,schema:O,uiSchema:r,registry:g}),W={description:N.jsx(A,{id:Uc(X),description:U,schema:O,uiSchema:r,registry:g}),rawDescription:I,help:re,rawHelp:typeof Y=="string"?Y:void 0,errors:le,rawErrors:H?void 0:K,id:X,label:j,hidden:ne,onChange:f,onKeyChange:d,onDropPropertyClick:h,required:m,disabled:P,readonly:q,hideError:H,displayLabel:G,classNames:ae.join(" ").trim(),style:S.style,formContext:w,formData:i,schema:O,uiSchema:r,registry:g},J=g.fields.AnyOfField,se=g.fields.OneOfField,fe=(r==null?void 0:r["ui:field"])&&(r==null?void 0:r["ui:fieldReplacesAnyOrOneOf"])===!0;return N.jsx(x,{...W,children:N.jsxs(N.Fragment,{children:[V,O.anyOf&&!fe&&!b.isSelect(O)&&N.jsx(J,{name:c,disabled:P,readonly:q,hideError:H,errorSchema:a,formData:i,formContext:w,idPrefix:o,idSchema:L,idSeparator:l,onBlur:e.onBlur,onChange:e.onChange,onFocus:e.onFocus,options:O.anyOf.map(me=>b.retrieveSchema(Mt(me)?me:{},i)),registry:g,required:m,schema:O,uiSchema:r}),O.oneOf&&!fe&&!b.isSelect(O)&&N.jsx(se,{name:c,disabled:P,readonly:q,hideError:H,errorSchema:a,formData:i,formContext:w,idPrefix:o,idSchema:L,idSeparator:l,onBlur:e.onBlur,onChange:e.onChange,onFocus:e.onFocus,options:O.oneOf.map(me=>b.retrieveSchema(Mt(me)?me:{},i)),registry:g,required:m,schema:O,uiSchema:r})]})})}class dme extends te.Component{shouldComponentUpdate(t){return!It(this.props,t)}render(){return N.jsx(fme,{...this.props})}}function hme(e){const{schema:t,name:n,uiSchema:r,idSchema:i,formData:a,required:o,disabled:l=!1,readonly:c=!1,autofocus:f=!1,onChange:d,onBlur:h,onFocus:m,registry:g,rawErrors:v,hideError:w}=e,{title:b,format:_}=t,{widgets:S,formContext:x,schemaUtils:A,globalUiOptions:k}=g,T=A.isSelect(t)?xc(t,r):void 0;let O=T?"select":"text";_&&Rhe(t,_,S)&&(O=_);const{widget:$=O,placeholder:L="",title:M,...z}=ot(r),P=A.getDisplayLabel(t,r,k),q=M??b??n,D=ji(t,$,S);return N.jsx(D,{options:{...z,enumOptions:T},schema:t,uiSchema:r,id:i.$id,name:n,label:q,hideLabel:!P,hideError:w,value:a,onChange:d,onBlur:h,onFocus:m,required:o,disabled:l,readonly:c,formContext:x,autofocus:f,registry:g,placeholder:L,rawErrors:v})}function pme(e){const{formData:t,onChange:n}=e;return te.useEffect(()=>{t===void 0&&n(null)},[t,n]),null}function mme(){return{AnyOfField:gD,ArrayField:Khe,BooleanField:Xhe,NumberField:Jhe,ObjectField:lme,OneOfField:gD,SchemaField:dme,StringField:hme,NullField:pme}}function gme(e){const{idSchema:t,description:n,registry:r,schema:i,uiSchema:a}=e,o=ot(a,r.globalUiOptions),{label:l=!0}=o;if(!n||!l)return null;const c=yt("DescriptionFieldTemplate",r,o);return N.jsx(c,{id:Uc(t),description:n,schema:i,uiSchema:a,registry:r})}function yme(e){const{children:t,className:n,disabled:r,hasToolbar:i,hasMoveDown:a,hasMoveUp:o,hasRemove:l,hasCopy:c,index:f,onCopyIndexClick:d,onDropIndexClick:h,onReorderClick:m,readonly:g,registry:v,uiSchema:w}=e,{CopyButton:b,MoveDownButton:_,MoveUpButton:S,RemoveButton:x}=v.templates.ButtonTemplates,A={flex:1,paddingLeft:6,paddingRight:6,fontWeight:"bold"};return N.jsxs("div",{className:n,children:[N.jsx("div",{className:i?"col-xs-9":"col-xs-12",children:t}),i&&N.jsx("div",{className:"col-xs-3 array-item-toolbox",children:N.jsxs("div",{className:"btn-group",style:{display:"flex",justifyContent:"space-around"},children:[(o||a)&&N.jsx(S,{style:A,disabled:r||g||!o,onClick:m(f,f-1),uiSchema:w,registry:v}),(o||a)&&N.jsx(_,{style:A,disabled:r||g||!a,onClick:m(f,f+1),uiSchema:w,registry:v}),c&&N.jsx(b,{style:A,disabled:r||g,onClick:d(f),uiSchema:w,registry:v}),l&&N.jsx(x,{style:A,disabled:r||g,onClick:h(f),uiSchema:w,registry:v})]})})]})}function bme(e){const{canAdd:t,className:n,disabled:r,idSchema:i,uiSchema:a,items:o,onAddClick:l,readonly:c,registry:f,required:d,schema:h,title:m}=e,g=ot(a),v=yt("ArrayFieldDescriptionTemplate",f,g),w=yt("ArrayFieldItemTemplate",f,g),b=yt("ArrayFieldTitleTemplate",f,g),{ButtonTemplates:{AddButton:_}}=f.templates;return N.jsxs("fieldset",{className:n,id:i.$id,children:[N.jsx(b,{idSchema:i,title:g.title||m,required:d,schema:h,uiSchema:a,registry:f}),N.jsx(v,{idSchema:i,description:g.description||h.description,schema:h,uiSchema:a,registry:f}),N.jsx("div",{className:"row array-item-list",children:o&&o.map(({key:S,...x})=>N.jsx(w,{...x},S))}),t&&N.jsx(_,{className:"array-item-add",onClick:l,disabled:r||c,uiSchema:a,registry:f})]})}function vme(e){const{idSchema:t,title:n,schema:r,uiSchema:i,required:a,registry:o}=e,l=ot(i,o.globalUiOptions),{label:c=!0}=l;if(!n||!c)return null;const f=yt("TitleFieldTemplate",o,l);return N.jsx(f,{id:ML(t),title:n,required:a,schema:r,uiSchema:i,registry:o})}function _me(e){const{id:t,name:n,value:r,readonly:i,disabled:a,autofocus:o,onBlur:l,onFocus:c,onChange:f,onChangeOverride:d,options:h,schema:m,uiSchema:g,formContext:v,registry:w,rawErrors:b,type:_,hideLabel:S,hideError:x,...A}=e;if(!t)throw console.log("No id for",e),new Error(`no id for props ${JSON.stringify(e)}`);const k={...A,...She(m,_,h)};let T;k.type==="number"||k.type==="integer"?T=r||r===0?r:"":T=r??"";const O=te.useCallback(({target:{value:M}})=>f(M===""?h.emptyValue:M),[f,h]),$=te.useCallback(({target:M})=>l(t,M&&M.value),[l,t]),L=te.useCallback(({target:M})=>c(t,M&&M.value),[c,t]);return N.jsxs(N.Fragment,{children:[N.jsx("input",{id:t,name:t,className:"form-control",readOnly:i,disabled:a,autoFocus:o,value:T,...k,list:m.examples?Xw(t):void 0,onChange:d||O,onBlur:$,onFocus:L,"aria-describedby":Is(t,!!m.examples)}),Array.isArray(m.examples)&&N.jsx("datalist",{id:Xw(t),children:m.examples.concat(m.default&&!m.examples.includes(m.default)?[m.default]:[]).map(M=>N.jsx("option",{value:M},M))},`datalist_${t}`)]})}function xme({uiSchema:e}){const{submitText:t,norender:n,props:r={}}=Ehe(e);return n?null:N.jsx("div",{children:N.jsx("button",{type:"submit",...r,className:`btn btn-info ${r.className||""}`,children:t})})}function Vc(e){const{iconType:t="default",icon:n,className:r,uiSchema:i,registry:a,...o}=e;return N.jsx("button",{type:"button",className:`btn btn-${t} ${r}`,...o,children:N.jsx("i",{className:`glyphicon glyphicon-${n}`})})}function wme(e){const{registry:{translateString:t}}=e;return N.jsx(Vc,{title:t(Tt.CopyButton),className:"array-item-copy",...e,icon:"copy"})}function Sme(e){const{registry:{translateString:t}}=e;return N.jsx(Vc,{title:t(Tt.MoveDownButton),className:"array-item-move-down",...e,icon:"arrow-down"})}function Eme(e){const{registry:{translateString:t}}=e;return N.jsx(Vc,{title:t(Tt.MoveUpButton),className:"array-item-move-up",...e,icon:"arrow-up"})}function kme(e){const{registry:{translateString:t}}=e;return N.jsx(Vc,{title:t(Tt.RemoveButton),className:"array-item-remove",...e,iconType:"danger",icon:"remove"})}function Ame({className:e,onClick:t,disabled:n,registry:r}){const{translateString:i}=r;return N.jsx("div",{className:"row",children:N.jsx("p",{className:`col-xs-3 col-xs-offset-9 text-right ${e}`,children:N.jsx(Vc,{iconType:"info",icon:"plus",className:"btn-add col-xs-12",title:i(Tt.AddButton),onClick:t,disabled:n,registry:r})})})}function Tme(){return{SubmitButton:xme,AddButton:Ame,CopyButton:wme,MoveDownButton:Sme,MoveUpButton:Eme,RemoveButton:kme}}function Cme(e){const{id:t,description:n}=e;return n?typeof n=="string"?N.jsx("p",{id:t,className:"field-description",children:n}):N.jsx("div",{id:t,className:"field-description",children:n}):null}function Ome({errors:e,registry:t}){const{translateString:n}=t;return N.jsxs("div",{className:"panel panel-danger errors",children:[N.jsx("div",{className:"panel-heading",children:N.jsx("h3",{className:"panel-title",children:n(Tt.ErrorsLabel)})}),N.jsx("ul",{className:"list-group",children:e.map((r,i)=>N.jsx("li",{className:"list-group-item text-danger",children:r.stack},i))})]})}const Nme="*";function HL(e){const{label:t,required:n,id:r}=e;return t?N.jsxs("label",{className:"control-label",htmlFor:r,children:[t,n&&N.jsx("span",{className:"required",children:Nme})]}):null}function Rme(e){const{id:t,label:n,children:r,errors:i,help:a,description:o,hidden:l,required:c,displayLabel:f,registry:d,uiSchema:h}=e,m=ot(h),g=yt("WrapIfAdditionalTemplate",d,m);return l?N.jsx("div",{className:"hidden",children:r}):N.jsxs(g,{...e,children:[f&&N.jsx(HL,{label:n,required:c,id:t}),f&&o?o:null,r,i,a]})}function jme(e){const{errors:t=[],idSchema:n}=e;if(t.length===0)return null;const r=RL(n);return N.jsx("div",{children:N.jsx("ul",{id:r,className:"error-detail bs-callout bs-callout-info",children:t.filter(i=>!!i).map((i,a)=>N.jsx("li",{className:"text-danger",children:i},a))})})}function Mme(e){const{idSchema:t,help:n}=e;if(!n)return null;const r=jL(t);return typeof n=="string"?N.jsx("p",{id:r,className:"help-block",children:n}):N.jsx("div",{id:r,className:"help-block",children:n})}function $me(e){const{description:t,disabled:n,formData:r,idSchema:i,onAddClick:a,properties:o,readonly:l,registry:c,required:f,schema:d,title:h,uiSchema:m}=e,g=ot(m),v=yt("TitleFieldTemplate",c,g),w=yt("DescriptionFieldTemplate",c,g),{ButtonTemplates:{AddButton:b}}=c.templates;return N.jsxs("fieldset",{id:i.$id,children:[h&&N.jsx(v,{id:ML(i),title:h,required:f,schema:d,uiSchema:m,registry:c}),t&&N.jsx(w,{id:Uc(i),description:t,schema:d,uiSchema:m,registry:c}),o.map(_=>_.content),rae(d,m,r)&&N.jsx(b,{className:"object-property-expand",onClick:a(d),disabled:n||l,uiSchema:m,registry:c})]})}const Dme="*";function Ime(e){const{id:t,title:n,required:r}=e;return N.jsxs("legend",{id:t,children:[n,r&&N.jsx("span",{className:"required",children:Dme})]})}function Pme(e){const{schema:t,idSchema:n,reason:r,registry:i}=e,{translateString:a}=i;let o=Tt.UnsupportedField;const l=[];return n&&n.$id&&(o=Tt.UnsupportedFieldWithId,l.push(n.$id)),r&&(o=o===Tt.UnsupportedField?Tt.UnsupportedFieldWithReason:Tt.UnsupportedFieldWithIdAndReason,l.push(r)),N.jsxs("div",{className:"unsupported-field",children:[N.jsx("p",{children:N.jsx(hm,{options:{disableParsingRawHTML:!0},children:a(o,l)})}),t&&N.jsx("pre",{children:JSON.stringify(t,null,2)})]})}function Lme(e){const{id:t,classNames:n,style:r,disabled:i,label:a,onKeyChange:o,onDropPropertyClick:l,readonly:c,required:f,schema:d,children:h,uiSchema:m,registry:g}=e,{templates:v,translateString:w}=g,{RemoveButton:b}=v.ButtonTemplates,_=w(Tt.KeyLabel,[a]);return Mc in d?N.jsx("div",{className:n,style:r,children:N.jsxs("div",{className:"row",children:[N.jsx("div",{className:"col-xs-5 form-additional",children:N.jsxs("div",{className:"form-group",children:[N.jsx(HL,{label:_,required:f,id:`${t}-key`}),N.jsx("input",{className:"form-control",type:"text",id:`${t}-key`,onBlur:({target:x})=>o(x&&x.value),defaultValue:a})]})}),N.jsx("div",{className:"form-additional form-group col-xs-5",children:h}),N.jsx("div",{className:"col-xs-2",children:N.jsx(b,{className:"array-item-remove btn-block",style:{border:"0"},disabled:i||c,onClick:l(a),uiSchema:m,registry:g})})]})}):N.jsx("div",{className:n,style:r,children:h})}function zme(){return{ArrayFieldDescriptionTemplate:gme,ArrayFieldItemTemplate:yme,ArrayFieldTemplate:bme,ArrayFieldTitleTemplate:vme,ButtonTemplates:Tme(),BaseInputTemplate:_me,DescriptionFieldTemplate:Cme,ErrorListTemplate:Ome,FieldTemplate:Rme,FieldErrorTemplate:jme,FieldHelpTemplate:Mme,ObjectFieldTemplate:$me,TitleFieldTemplate:Ime,UnsupportedFieldTemplate:Pme,WrapIfAdditionalTemplate:Lme}}function qme(e){return Object.values(e).every(t=>t!==-1)}function Fme({type:e,range:t,value:n,select:r,rootId:i,name:a,disabled:o,readonly:l,autofocus:c,registry:f,onBlur:d,onFocus:h}){const m=i+"_"+e,{SelectWidget:g}=f.widgets;return N.jsx(g,{schema:{type:"integer"},id:m,name:a,className:"form-control",options:{enumOptions:OL(t[0],t[1])},placeholder:e,value:n,disabled:o,readonly:l,autofocus:c,onChange:v=>r(e,v),onBlur:d,onFocus:h,registry:f,label:"","aria-describedby":Is(i)})}function Bme({time:e=!1,disabled:t=!1,readonly:n=!1,autofocus:r=!1,options:i,id:a,name:o,registry:l,onBlur:c,onFocus:f,onChange:d,value:h}){const{translateString:m}=l,[g,v]=te.useState(h),[w,b]=te.useReducer((A,k)=>({...A,...k}),Rx(h,e));te.useEffect(()=>{const A=hD(w,e);qme(w)&&A!==h?d(A):g!==h&&(v(h),b(Rx(h,e)))},[e,h,d,w,g]);const _=te.useCallback((A,k)=>{b({[A]:k})},[]),S=te.useCallback(A=>{if(A.preventDefault(),t||n)return;const k=Rx(new Date().toJSON(),e);d(hD(k,e))},[t,n,e]),x=te.useCallback(A=>{A.preventDefault(),!(t||n)&&d(void 0)},[t,n,d]);return N.jsxs("ul",{className:"list-inline",children:[xhe(w,e,i.yearsRange,i.format).map((A,k)=>N.jsx("li",{className:"list-inline-item",children:N.jsx(Fme,{rootId:a,name:o,select:_,...A,disabled:t,readonly:n,registry:l,onBlur:c,onFocus:f,autofocus:r&&k===0})},k)),(i.hideNowButton!=="undefined"?!i.hideNowButton:!0)&&N.jsx("li",{className:"list-inline-item",children:N.jsx("a",{href:"#",className:"btn btn-info btn-now",onClick:S,children:m(Tt.NowLabel)})}),(i.hideClearButton!=="undefined"?!i.hideClearButton:!0)&&N.jsx("li",{className:"list-inline-item",children:N.jsx("a",{href:"#",className:"btn btn-warning btn-clear",onClick:x,children:m(Tt.ClearLabel)})})]})}function Ume({time:e=!0,...t}){const{AltDateWidget:n}=t.registry.widgets;return N.jsx(n,{time:e,...t})}function Vme({schema:e,uiSchema:t,options:n,id:r,value:i,disabled:a,readonly:o,label:l,hideLabel:c,autofocus:f=!1,onBlur:d,onFocus:h,onChange:m,registry:g}){const v=yt("DescriptionFieldTemplate",g,n),w=Rh(e),b=te.useCallback(A=>m(A.target.checked),[m]),_=te.useCallback(A=>d(r,A.target.checked),[d,r]),S=te.useCallback(A=>h(r,A.target.checked),[h,r]),x=n.description??e.description;return N.jsxs("div",{className:`checkbox ${a||o?"disabled":""}`,children:[!c&&!!x&&N.jsx(v,{id:Uc(r),description:x,schema:e,uiSchema:t,registry:g}),N.jsxs("label",{children:[N.jsx("input",{type:"checkbox",id:r,name:r,checked:typeof i>"u"?!1:i,required:w,disabled:a||o,autoFocus:f,onChange:b,onBlur:_,onFocus:S,"aria-describedby":Is(r)}),jhe(N.jsx("span",{children:l}),c)]})]})}function Hme({id:e,disabled:t,options:{inline:n=!1,enumOptions:r,enumDisabled:i,emptyValue:a},value:o,autofocus:l=!1,readonly:c,onChange:f,onBlur:d,onFocus:h}){const m=Array.isArray(o)?o:[o],g=te.useCallback(({target:w})=>d(e,Qr(w&&w.value,r,a)),[d,e]),v=te.useCallback(({target:w})=>h(e,Qr(w&&w.value,r,a)),[h,e]);return N.jsx("div",{className:"checkboxes",id:e,children:Array.isArray(r)&&r.map((w,b)=>{const _=$E(w.value,m),S=Array.isArray(i)&&i.indexOf(w.value)!==-1,x=t||S||c?"disabled":"",A=T=>{T.target.checked?f(ghe(b,m,r)):f(phe(b,m,r))},k=N.jsxs("span",{children:[N.jsx("input",{type:"checkbox",id:$L(e,b),name:e,checked:_,value:String(b),disabled:t||S||c,autoFocus:l&&b===0,onChange:A,onBlur:g,onFocus:v,"aria-describedby":Is(e)}),N.jsx("span",{children:w.label})]});return n?N.jsx("label",{className:`checkbox-inline ${x}`,children:k},b):N.jsx("div",{className:`checkbox ${x}`,children:N.jsx("label",{children:k})},b)})})}function Gme(e){const{disabled:t,readonly:n,options:r,registry:i}=e,a=yt("BaseInputTemplate",i,r);return N.jsx(a,{type:"color",...e,disabled:t||n})}function Yme(e){const{onChange:t,options:n,registry:r}=e,i=yt("BaseInputTemplate",r,n),a=te.useCallback(o=>t(o||void 0),[t]);return N.jsx(i,{type:"date",...e,onChange:a})}function Zme(e){const{onChange:t,value:n,options:r,registry:i}=e,a=yt("BaseInputTemplate",i,r);return N.jsx(a,{type:"datetime-local",...e,value:Phe(n),onChange:o=>t(Mhe(o))})}function Kme(e){const{options:t,registry:n}=e,r=yt("BaseInputTemplate",n,t);return N.jsx(r,{type:"email",...e})}function Xme(e,t){return e===null?null:e.replace(";base64",`;name=${encodeURIComponent(t)};base64`)}function Wme(e){const{name:t,size:n,type:r}=e;return new Promise((i,a)=>{const o=new window.FileReader;o.onerror=a,o.onload=l=>{var c;typeof((c=l.target)==null?void 0:c.result)=="string"?i({dataURL:Xme(l.target.result,t),name:t,size:n,type:r}):i({dataURL:null,name:t,size:n,type:r})},o.readAsDataURL(e)})}function Qme(e){return Promise.all(Array.from(e).map(Wme))}function Jme({fileInfo:e,registry:t}){const{translateString:n}=t,{dataURL:r,type:i,name:a}=e;return r?["image/jpeg","image/png"].includes(i)?N.jsx("img",{src:r,style:{maxWidth:"100%"},className:"file-preview"}):N.jsxs(N.Fragment,{children:[" ",N.jsx("a",{download:`preview-${a}`,href:r,className:"file-download",children:n(Tt.PreviewLabel)})]}):null}function ege({filesInfo:e,registry:t,preview:n,onRemove:r,options:i}){if(e.length===0)return null;const{translateString:a}=t,{RemoveButton:o}=yt("ButtonTemplates",t,i);return N.jsx("ul",{className:"file-info",children:e.map((l,c)=>{const{name:f,size:d,type:h}=l,m=()=>r(c);return N.jsxs("li",{children:[N.jsx(hm,{children:a(Tt.FilesInfo,[f,h,String(d)])}),n&&N.jsx(Jme,{fileInfo:l,registry:t}),N.jsx(o,{onClick:m,registry:t})]},c)})})}function tge(e){return e.reduce((t,n)=>{if(!n)return t;try{const{blob:r,name:i}=fhe(n);return[...t,{dataURL:n,name:i,size:r.size,type:r.type}]}catch{return t}},[])}function nge(e){const{disabled:t,readonly:n,required:r,multiple:i,onChange:a,value:o,options:l,registry:c}=e,f=yt("BaseInputTemplate",c,l),d=te.useCallback(g=>{g.target.files&&Qme(g.target.files).then(v=>{const w=v.map(b=>b.dataURL);a(i?o.concat(w):w[0])})},[i,o,a]),h=te.useMemo(()=>tge(Array.isArray(o)?o:[o]),[o]),m=te.useCallback(g=>{if(i){const v=o.filter((w,b)=>b!==g);a(v)}else a(void 0)},[i,o,a]);return N.jsxs("div",{children:[N.jsx(f,{...e,disabled:t||n,type:"file",required:o?!1:r,onChangeOverride:d,value:"",accept:l.accept?String(l.accept):void 0}),N.jsx(ege,{filesInfo:h,onRemove:m,registry:c,preview:l.filePreview,options:l})]})}function rge({id:e,value:t}){return N.jsx("input",{type:"hidden",id:e,name:e,value:typeof t>"u"?"":t})}function ige(e){const{options:t,registry:n}=e,r=yt("BaseInputTemplate",n,t);return N.jsx(r,{type:"password",...e})}function age({options:e,value:t,required:n,disabled:r,readonly:i,autofocus:a=!1,onBlur:o,onFocus:l,onChange:c,id:f}){const{enumOptions:d,enumDisabled:h,inline:m,emptyValue:g}=e,v=te.useCallback(({target:b})=>o(f,Qr(b&&b.value,d,g)),[o,f]),w=te.useCallback(({target:b})=>l(f,Qr(b&&b.value,d,g)),[l,f]);return N.jsx("div",{className:"field-radio-group",id:f,children:Array.isArray(d)&&d.map((b,_)=>{const S=$E(b.value,t),x=Array.isArray(h)&&h.indexOf(b.value)!==-1,A=r||x||i?"disabled":"",k=()=>c(b.value),T=N.jsxs("span",{children:[N.jsx("input",{type:"radio",id:$L(f,_),checked:S,name:f,required:n,value:String(_),disabled:r||x||i,autoFocus:a&&_===0,onChange:k,onBlur:v,onFocus:w,"aria-describedby":Is(f)}),N.jsx("span",{children:b.label})]});return m?N.jsx("label",{className:`radio-inline ${A}`,children:T},_):N.jsx("div",{className:`radio ${A}`,children:N.jsx("label",{children:T})},_)})})}function sge(e){const{value:t,registry:{templates:{BaseInputTemplate:n}}}=e;return N.jsxs("div",{className:"field-range-wrapper",children:[N.jsx(n,{type:"range",...e}),N.jsx("span",{className:"range-view",children:t})]})}function Lx(e,t){return t?Array.from(e.target.options).slice().filter(n=>n.selected).map(n=>n.value):e.target.value}function oge({schema:e,id:t,options:n,value:r,required:i,disabled:a,readonly:o,multiple:l=!1,autofocus:c=!1,onChange:f,onBlur:d,onFocus:h,placeholder:m}){const{enumOptions:g,enumDisabled:v,emptyValue:w}=n,b=l?[]:"",_=te.useCallback(T=>{const O=Lx(T,l);return h(t,Qr(O,g,w))},[h,t,e,l,g,w]),S=te.useCallback(T=>{const O=Lx(T,l);return d(t,Qr(O,g,w))},[d,t,e,l,g,w]),x=te.useCallback(T=>{const O=Lx(T,l);return f(Qr(O,g,w))},[f,e,l,g,w]),A=mhe(r,g,l),k=!l&&e.default===void 0;return N.jsxs("select",{id:t,name:t,multiple:l,className:"form-control",value:typeof A>"u"?b:A,required:i,disabled:a||o,autoFocus:c,onBlur:S,onFocus:_,onChange:x,"aria-describedby":Is(t),children:[k&&N.jsx("option",{value:"",children:m}),Array.isArray(g)&&g.map(({value:T,label:O},$)=>{const L=v&&v.indexOf(T)!==-1;return N.jsx("option",{value:String($),disabled:L,children:O},$)})]})}function GL({id:e,options:t={},placeholder:n,value:r,required:i,disabled:a,readonly:o,autofocus:l=!1,onChange:c,onBlur:f,onFocus:d}){const h=te.useCallback(({target:{value:v}})=>c(v===""?t.emptyValue:v),[c,t.emptyValue]),m=te.useCallback(({target:v})=>f(e,v&&v.value),[f,e]),g=te.useCallback(({target:v})=>d(e,v&&v.value),[e,d]);return N.jsx("textarea",{id:e,name:e,className:"form-control",value:r||"",placeholder:n,required:i,disabled:a,readOnly:o,autoFocus:l,rows:t.rows,onBlur:m,onFocus:g,onChange:h,"aria-describedby":Is(e)})}GL.defaultProps={autofocus:!1,options:{}};function lge(e){const{options:t,registry:n}=e,r=yt("BaseInputTemplate",n,t);return N.jsx(r,{...e})}function uge(e){const{onChange:t,options:n,registry:r}=e,i=yt("BaseInputTemplate",r,n),a=te.useCallback(o=>t(o?`${o}:00`:void 0),[t]);return N.jsx(i,{type:"time",...e,onChange:a})}function cge(e){const{options:t,registry:n}=e,r=yt("BaseInputTemplate",n,t);return N.jsx(r,{type:"url",...e})}function fge(e){const{options:t,registry:n}=e,r=yt("BaseInputTemplate",n,t);return N.jsx(r,{type:"number",...e})}function dge(){return{AltDateWidget:Bme,AltDateTimeWidget:Ume,CheckboxWidget:Vme,CheckboxesWidget:Hme,ColorWidget:Gme,DateWidget:Yme,DateTimeWidget:Zme,EmailWidget:Kme,FileWidget:nge,HiddenWidget:rge,PasswordWidget:ige,RadioWidget:age,RangeWidget:sge,SelectWidget:oge,TextWidget:lge,TextareaWidget:GL,TimeWidget:uge,UpDownWidget:fge,URLWidget:cge}}function hge(){return{fields:mme(),templates:zme(),widgets:dge(),rootSchema:{},formContext:{},translateString:hhe}}class pge extends te.Component{constructor(n){super(n);De(this,"formElement");De(this,"getUsedFormData",(n,r)=>{if(r.length===0&&typeof n!="object")return n;const i=pD(n,r);return Array.isArray(n)?Object.keys(i).map(a=>i[a]):i});De(this,"getFieldNames",(n,r)=>{const i=(a,o=[],l=[[]])=>(Object.keys(a).forEach(c=>{if(typeof a[c]=="object"){const f=l.map(d=>[...d,c]);a[c][PS]&&a[c][Oh]!==""?o.push(a[c][Oh]):i(a[c],o,f)}else c===Oh&&a[c]!==""&&l.forEach(f=>{const d=Ne(r,f);(typeof d!="object"||tl(d)||Array.isArray(d)&&d.every(h=>typeof h!="object"))&&o.push(f)})}),o);return i(n)});De(this,"omitExtraData",n=>{const{schema:r,schemaUtils:i}=this.state,a=i.retrieveSchema(r,n),o=i.toPathSchema(a,"",n),l=this.getFieldNames(o,n);return this.getUsedFormData(n,l)});De(this,"onChange",(n,r,i)=>{const{extraErrors:a,omitExtraData:o,liveOmit:l,noValidate:c,liveValidate:f,onChange:d}=this.props,{schemaUtils:h,schema:m}=this.state;let g=this.state.retrievedSchema;if(lt(n)||Array.isArray(n)){const _=this.getStateFromProps(this.props,n);n=_.formData,g=_.retrievedSchema}const v=!c&&f;let w={formData:n,schema:m},b=n;if(o===!0&&l===!0&&(b=this.omitExtraData(n),w={formData:b}),v){const _=this.validate(b,m,h,g);let S=_.errors,x=_.errorSchema;const A=S,k=x;if(a){const T=jh(_,a);x=T.errorSchema,S=T.errors}if(r){const T=this.filterErrorsBasedOnSchema(r,g,b);x=Oi(x,T,"preventDuplicates")}w={formData:b,errors:S,errorSchema:x,schemaValidationErrors:A,schemaValidationErrorSchema:k}}else if(!c&&r){const _=a?Oi(r,a,"preventDuplicates"):r;w={formData:b,errorSchema:_,errors:wc(_)}}this.setState(w,()=>d&&d({...this.state,...w},i))});De(this,"reset",()=>{const{onChange:n}=this.props,a={formData:this.getStateFromProps(this.props,void 0).formData,errorSchema:{},errors:[],schemaValidationErrors:[],schemaValidationErrorSchema:{}};this.setState(a,()=>n&&n({...this.state,...a}))});De(this,"onBlur",(n,r)=>{const{onBlur:i}=this.props;i&&i(n,r)});De(this,"onFocus",(n,r)=>{const{onFocus:i}=this.props;i&&i(n,r)});De(this,"onSubmit",n=>{if(n.preventDefault(),n.target!==n.currentTarget)return;n.persist();const{omitExtraData:r,extraErrors:i,noValidate:a,onSubmit:o}=this.props;let{formData:l}=this.state;if(r===!0&&(l=this.omitExtraData(l)),a||this.validateFormWithFormData(l)){const c=i||{},f=i?wc(i):[];this.setState({formData:l,errors:f,errorSchema:c,schemaValidationErrors:[],schemaValidationErrorSchema:{}},()=>{o&&o({...this.state,formData:l,status:"submitted"},n)})}});De(this,"submit",()=>{if(this.formElement.current){const n=new CustomEvent("submit",{cancelable:!0});n.preventDefault(),this.formElement.current.dispatchEvent(n),this.formElement.current.requestSubmit()}});De(this,"validateFormWithFormData",n=>{const{extraErrors:r,extraErrorsBlockSubmit:i,focusOnFirstError:a,onError:o}=this.props,{errors:l}=this.state,c=this.validate(n);let f=c.errors,d=c.errorSchema;const h=f,m=d,g=f.length>0||r&&i;if(g){if(r){const v=jh(c,r);d=v.errorSchema,f=v.errors}a&&(typeof a=="function"?a(f[0]):this.focusOnError(f[0])),this.setState({errors:f,errorSchema:d,schemaValidationErrors:h,schemaValidationErrorSchema:m},()=>{o?o(f):console.error("Form validation failed",f)})}else l.length>0&&this.setState({errors:[],errorSchema:{},schemaValidationErrors:[],schemaValidationErrorSchema:{}});return!g});if(!n.validator)throw new Error("A validator is required for Form functionality to work");this.state=this.getStateFromProps(n,n.formData),this.props.onChange&&!It(this.state.formData,this.props.formData)&&this.props.onChange(this.state),this.formElement=te.createRef()}getSnapshotBeforeUpdate(n,r){if(!It(this.props,n)){const i=Vhe(this.props.formData,n.formData),a=!It(n.schema,this.props.schema),o=i.length>0||!It(n.formData,this.props.formData),l=this.getStateFromProps(this.props,this.props.formData,a||o?void 0:this.state.retrievedSchema,a,i),c=!It(l,r);return{nextState:l,shouldUpdate:c}}return{shouldUpdate:!1}}componentDidUpdate(n,r,i){if(i.shouldUpdate){const{nextState:a}=i;!It(a.formData,this.props.formData)&&!It(a.formData,r.formData)&&this.props.onChange&&this.props.onChange(a),this.setState(a)}}getStateFromProps(n,r,i,a=!1,o=[]){var M;const l=this.state||{},c="schema"in n?n.schema:this.props.schema,f=("uiSchema"in n?n.uiSchema:this.props.uiSchema)||{},d=typeof r<"u",h="liveValidate"in n?n.liveValidate:this.props.liveValidate,m=d&&!n.noValidate&&h,g=c,v="experimental_defaultFormStateBehavior"in n?n.experimental_defaultFormStateBehavior:this.props.experimental_defaultFormStateBehavior,w="experimental_customMergeAllOf"in n?n.experimental_customMergeAllOf:this.props.experimental_customMergeAllOf;let b=l.schemaUtils;(!b||b.doesSchemaUtilsDiffer(n.validator,g,v,w))&&(b=che(n.validator,g,v,w));const _=b.getDefaultFormState(c,r),S=this.updateRetrievedSchema(i??b.retrieveSchema(c,_)),x=()=>n.noValidate||a?{errors:[],errorSchema:{}}:n.liveValidate?{errors:l.errors||[],errorSchema:l.errorSchema||{}}:{errors:l.schemaValidationErrors||[],errorSchema:l.schemaValidationErrorSchema||{}};let A,k,T=l.schemaValidationErrors,O=l.schemaValidationErrorSchema;if(m){const z=this.validate(_,c,b,S);A=z.errors,i===void 0?k=z.errorSchema:k=Oi((M=this.state)==null?void 0:M.errorSchema,z.errorSchema,"preventDuplicates"),T=A,O=k}else{const z=x();if(A=z.errors,k=z.errorSchema,o.length>0){const P=o.reduce((q,D)=>(q[D]=void 0,q),{});k=O=Oi(z.errorSchema,P,"preventDuplicates")}}if(n.extraErrors){const z=jh({errorSchema:k,errors:A},n.extraErrors);k=z.errorSchema,A=z.errors}const $=b.toIdSchema(S,f["ui:rootFieldId"],_,n.idPrefix,n.idSeparator);return{schemaUtils:b,schema:c,uiSchema:f,idSchema:$,formData:_,edit:d,errors:A,errorSchema:k,schemaValidationErrors:T,schemaValidationErrorSchema:O,retrievedSchema:S}}shouldComponentUpdate(n,r){return Dhe(this,n,r)}getPreviousCustomValidateErrors(){const{customValidate:n,uiSchema:r}=this.props,i=this.state.formData;let a={};if(typeof n=="function"){const o=n(i,fp(i),r);a=DE(o)}return a}validate(n,r=this.props.schema,i,a){const o=i||this.state.schemaUtils,{customValidate:l,transformErrors:c,uiSchema:f}=this.props,d=a??o.retrieveSchema(r,n);return o.getValidator().validateFormData(n,d,l,c,f)}renderErrors(n){const{errors:r,errorSchema:i,schema:a,uiSchema:o}=this.state,{formContext:l}=this.props,c=ot(o),f=yt("ErrorListTemplate",n,c);return r&&r.length?N.jsx(f,{errors:r,errorSchema:i||{},schema:a,uiSchema:o,formContext:l,registry:n}):null}filterErrorsBasedOnSchema(n,r,i){const{retrievedSchema:a,schemaUtils:o}=this.state,l=r??a,c=o.toPathSchema(l,"",i),f=this.getFieldNames(c,i),d=pD(n,f);(r==null?void 0:r.type)!=="object"&&(r==null?void 0:r.type)!=="array"&&(d.__errors=n.__errors);const h=this.getPreviousCustomValidateErrors(),m=(v=[],w)=>v.length===0?v:v.filter(b=>!w.includes(b)),g=(v,w={})=>(Hhe(v,(b,_)=>{const S=w[_];Wu(b)||Array.isArray(b)&&b.length===0?delete v[_]:lt(b)&<(S)&&Array.isArray(S==null?void 0:S.__errors)?v[_]=m(b.__errors,S.__errors):typeof b=="object"&&!Array.isArray(b.__errors)&&g(b,w[_])}),v);return g(d,h)}updateRetrievedSchema(n){var i;return It(n,(i=this.state)==null?void 0:i.retrievedSchema)?this.state.retrievedSchema:n}getRegistry(){var d;const{translateString:n,uiSchema:r={}}=this.props,{schemaUtils:i}=this.state,{fields:a,templates:o,widgets:l,formContext:c,translateString:f}=hge();return{fields:{...a,...this.props.fields},templates:{...o,...this.props.templates,ButtonTemplates:{...o.ButtonTemplates,...(d=this.props.templates)==null?void 0:d.ButtonTemplates}},widgets:{...l,...this.props.widgets},rootSchema:this.props.schema,formContext:this.props.formContext||c,schemaUtils:i,translateString:n||f,globalUiOptions:r[nae]}}focusOnError(n){const{idPrefix:r="root",idSeparator:i="_"}=this.props,{property:a}=n,o=DL(a);o[0]===""?o[0]=r:o.unshift(r);const l=o.join(i);let c=this.formElement.current.elements[l];c||(c=this.formElement.current.querySelector(`input[id^="${l}"`)),c&&c.length&&(c=c[0]),c&&c.focus()}validateForm(){const{omitExtraData:n}=this.props;let{formData:r}=this.state;return n===!0&&(r=this.omitExtraData(r)),this.validateFormWithFormData(r)}render(){const{children:n,id:r,idPrefix:i,idSeparator:a,className:o="",tagName:l,name:c,method:f,target:d,action:h,autoComplete:m,enctype:g,acceptcharset:v,acceptCharset:w,noHtml5Validate:b=!1,disabled:_,readonly:S,formContext:x,showErrorList:A="top",_internalFormWrapper:k}=this.props,{schema:T,uiSchema:O,formData:$,errorSchema:L,idSchema:M}=this.state,z=this.getRegistry(),{SchemaField:P}=z.fields,{SubmitButton:q}=z.templates.ButtonTemplates,D=k?l:void 0,H=k||l||"form";let{[cp]:B={}}=ot(O);_&&(B={...B,props:{...B.props,disabled:!0}});const G={[Zu]:{[cp]:B}};return N.jsxs(H,{className:o||"rjsf",id:r,name:c,method:f,target:d,action:h,autoComplete:m,encType:g,acceptCharset:w||v,noValidate:b,onSubmit:this.onSubmit,as:D,ref:this.formElement,children:[A==="top"&&this.renderErrors(z),N.jsx(P,{name:"",schema:T,uiSchema:O,errorSchema:L,idSchema:M,idPrefix:i,idSeparator:a,formContext:x,formData:$,onChange:this.onChange,onBlur:this.onBlur,onFocus:this.onFocus,registry:z,disabled:_,readonly:S}),n||N.jsx(q,{uiSchema:G,registry:z}),A==="bottom"&&this.renderErrors(z)]})}}class mge extends KI.Component{constructor(t){super(t),this.state={hasError:!1}}static getDerivedStateFromError(t){return{hasError:!0}}componentDidCatch(t,n){console.error("Uncaught error:",t,n)}render(){return this.state.hasError?N.jsx("h1",{children:"出错了!请稍后重试。"}):this.props.children}}var Dd={exports:{}},zx={},ki={},as={},qx={},Fx={},Bx={},ND;function gp(){return ND||(ND=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.regexpCode=e.getEsmExportName=e.getProperty=e.safeStringify=e.stringify=e.strConcat=e.addCodeArg=e.str=e._=e.nil=e._Code=e.Name=e.IDENTIFIER=e._CodeOrName=void 0;class t{}e._CodeOrName=t,e.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class n extends t{constructor(S){if(super(),!e.IDENTIFIER.test(S))throw new Error("CodeGen: name must be a valid identifier");this.str=S}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}e.Name=n;class r extends t{constructor(S){super(),this._items=typeof S=="string"?[S]:S}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const S=this._items[0];return S===""||S==='""'}get str(){var S;return(S=this._str)!==null&&S!==void 0?S:this._str=this._items.reduce((x,A)=>`${x}${A}`,"")}get names(){var S;return(S=this._names)!==null&&S!==void 0?S:this._names=this._items.reduce((x,A)=>(A instanceof n&&(x[A.str]=(x[A.str]||0)+1),x),{})}}e._Code=r,e.nil=new r("");function i(_,...S){const x=[_[0]];let A=0;for(;A<S.length;)l(x,S[A]),x.push(_[++A]);return new r(x)}e._=i;const a=new r("+");function o(_,...S){const x=[g(_[0])];let A=0;for(;A<S.length;)x.push(a),l(x,S[A]),x.push(a,g(_[++A]));return c(x),new r(x)}e.str=o;function l(_,S){S instanceof r?_.push(...S._items):S instanceof n?_.push(S):_.push(h(S))}e.addCodeArg=l;function c(_){let S=1;for(;S<_.length-1;){if(_[S]===a){const x=f(_[S-1],_[S+1]);if(x!==void 0){_.splice(S-1,3,x);continue}_[S++]="+"}S++}}function f(_,S){if(S==='""')return _;if(_==='""')return S;if(typeof _=="string")return S instanceof n||_[_.length-1]!=='"'?void 0:typeof S!="string"?`${_.slice(0,-1)}${S}"`:S[0]==='"'?_.slice(0,-1)+S.slice(1):void 0;if(typeof S=="string"&&S[0]==='"'&&!(_ instanceof n))return`"${_}${S.slice(1)}`}function d(_,S){return S.emptyStr()?_:_.emptyStr()?S:o`${_}${S}`}e.strConcat=d;function h(_){return typeof _=="number"||typeof _=="boolean"||_===null?_:g(Array.isArray(_)?_.join(","):_)}function m(_){return new r(g(_))}e.stringify=m;function g(_){return JSON.stringify(_).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}e.safeStringify=g;function v(_){return typeof _=="string"&&e.IDENTIFIER.test(_)?new r(`.${_}`):i`[${_}]`}e.getProperty=v;function w(_){if(typeof _=="string"&&e.IDENTIFIER.test(_))return new r(`${_}`);throw new Error(`CodeGen: invalid export name: ${_}, use explicit $id name mapping`)}e.getEsmExportName=w;function b(_){return new r(_.toString())}e.regexpCode=b}(Bx)),Bx}var Ux={},RD;function jD(){return RD||(RD=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ValueScope=e.ValueScopeName=e.Scope=e.varKinds=e.UsedValueState=void 0;const t=gp();class n extends Error{constructor(f){super(`CodeGen: "code" for ${f} not defined`),this.value=f.value}}var r;(function(c){c[c.Started=0]="Started",c[c.Completed=1]="Completed"})(r||(e.UsedValueState=r={})),e.varKinds={const:new t.Name("const"),let:new t.Name("let"),var:new t.Name("var")};class i{constructor({prefixes:f,parent:d}={}){this._names={},this._prefixes=f,this._parent=d}toName(f){return f instanceof t.Name?f:this.name(f)}name(f){return new t.Name(this._newName(f))}_newName(f){const d=this._names[f]||this._nameGroup(f);return`${f}${d.index++}`}_nameGroup(f){var d,h;if(!((h=(d=this._parent)===null||d===void 0?void 0:d._prefixes)===null||h===void 0)&&h.has(f)||this._prefixes&&!this._prefixes.has(f))throw new Error(`CodeGen: prefix "${f}" is not allowed in this scope`);return this._names[f]={prefix:f,index:0}}}e.Scope=i;class a extends t.Name{constructor(f,d){super(d),this.prefix=f}setValue(f,{property:d,itemIndex:h}){this.value=f,this.scopePath=(0,t._)`.${new t.Name(d)}[${h}]`}}e.ValueScopeName=a;const o=(0,t._)`\n`;class l extends i{constructor(f){super(f),this._values={},this._scope=f.scope,this.opts={...f,_n:f.lines?o:t.nil}}get(){return this._scope}name(f){return new a(f,this._newName(f))}value(f,d){var h;if(d.ref===void 0)throw new Error("CodeGen: ref must be passed in value");const m=this.toName(f),{prefix:g}=m,v=(h=d.key)!==null&&h!==void 0?h:d.ref;let w=this._values[g];if(w){const S=w.get(v);if(S)return S}else w=this._values[g]=new Map;w.set(v,m);const b=this._scope[g]||(this._scope[g]=[]),_=b.length;return b[_]=d.ref,m.setValue(d,{property:g,itemIndex:_}),m}getValue(f,d){const h=this._values[f];if(h)return h.get(d)}scopeRefs(f,d=this._values){return this._reduceValues(d,h=>{if(h.scopePath===void 0)throw new Error(`CodeGen: name "${h}" has no value`);return(0,t._)`${f}${h.scopePath}`})}scopeCode(f=this._values,d,h){return this._reduceValues(f,m=>{if(m.value===void 0)throw new Error(`CodeGen: name "${m}" has no value`);return m.value.code},d,h)}_reduceValues(f,d,h={},m){let g=t.nil;for(const v in f){const w=f[v];if(!w)continue;const b=h[v]=h[v]||new Map;w.forEach(_=>{if(b.has(_))return;b.set(_,r.Started);let S=d(_);if(S){const x=this.opts.es5?e.varKinds.var:e.varKinds.const;g=(0,t._)`${g}${x} ${_} = ${S};${this.opts._n}`}else if(S=m==null?void 0:m(_))g=(0,t._)`${g}${S}${this.opts._n}`;else throw new n(_);b.set(_,r.Completed)})}return g}}e.ValueScope=l}(Ux)),Ux}var MD;function Xe(){return MD||(MD=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.or=e.and=e.not=e.CodeGen=e.operators=e.varKinds=e.ValueScopeName=e.ValueScope=e.Scope=e.Name=e.regexpCode=e.stringify=e.getProperty=e.nil=e.strConcat=e.str=e._=void 0;const t=gp(),n=jD();var r=gp();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return r._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(e,"strConcat",{enumerable:!0,get:function(){return r.strConcat}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(e,"getProperty",{enumerable:!0,get:function(){return r.getProperty}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(e,"regexpCode",{enumerable:!0,get:function(){return r.regexpCode}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return r.Name}});var i=jD();Object.defineProperty(e,"Scope",{enumerable:!0,get:function(){return i.Scope}}),Object.defineProperty(e,"ValueScope",{enumerable:!0,get:function(){return i.ValueScope}}),Object.defineProperty(e,"ValueScopeName",{enumerable:!0,get:function(){return i.ValueScopeName}}),Object.defineProperty(e,"varKinds",{enumerable:!0,get:function(){return i.varKinds}}),e.operators={GT:new t._Code(">"),GTE:new t._Code(">="),LT:new t._Code("<"),LTE:new t._Code("<="),EQ:new t._Code("==="),NEQ:new t._Code("!=="),NOT:new t._Code("!"),OR:new t._Code("||"),AND:new t._Code("&&"),ADD:new t._Code("+")};class a{optimizeNodes(){return this}optimizeNames(I,U){return this}}class o extends a{constructor(I,U,Y){super(),this.varKind=I,this.name=U,this.rhs=Y}render({es5:I,_n:U}){const Y=I?n.varKinds.var:this.varKind,ne=this.rhs===void 0?"":` = ${this.rhs}`;return`${Y} ${this.name}${ne};`+U}optimizeNames(I,U){if(I[this.name.str])return this.rhs&&(this.rhs=D(this.rhs,I,U)),this}get names(){return this.rhs instanceof t._CodeOrName?this.rhs.names:{}}}class l extends a{constructor(I,U,Y){super(),this.lhs=I,this.rhs=U,this.sideEffects=Y}render({_n:I}){return`${this.lhs} = ${this.rhs};`+I}optimizeNames(I,U){if(!(this.lhs instanceof t.Name&&!I[this.lhs.str]&&!this.sideEffects))return this.rhs=D(this.rhs,I,U),this}get names(){const I=this.lhs instanceof t.Name?{}:{...this.lhs.names};return q(I,this.rhs)}}class c extends l{constructor(I,U,Y,ne){super(I,Y,ne),this.op=U}render({_n:I}){return`${this.lhs} ${this.op}= ${this.rhs};`+I}}class f extends a{constructor(I){super(),this.label=I,this.names={}}render({_n:I}){return`${this.label}:`+I}}class d extends a{constructor(I){super(),this.label=I,this.names={}}render({_n:I}){return`break${this.label?` ${this.label}`:""};`+I}}class h extends a{constructor(I){super(),this.error=I}render({_n:I}){return`throw ${this.error};`+I}get names(){return this.error.names}}class m extends a{constructor(I){super(),this.code=I}render({_n:I}){return`${this.code};`+I}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(I,U){return this.code=D(this.code,I,U),this}get names(){return this.code instanceof t._CodeOrName?this.code.names:{}}}class g extends a{constructor(I=[]){super(),this.nodes=I}render(I){return this.nodes.reduce((U,Y)=>U+Y.render(I),"")}optimizeNodes(){const{nodes:I}=this;let U=I.length;for(;U--;){const Y=I[U].optimizeNodes();Array.isArray(Y)?I.splice(U,1,...Y):Y?I[U]=Y:I.splice(U,1)}return I.length>0?this:void 0}optimizeNames(I,U){const{nodes:Y}=this;let ne=Y.length;for(;ne--;){const ae=Y[ne];ae.optimizeNames(I,U)||(H(I,ae.names),Y.splice(ne,1))}return Y.length>0?this:void 0}get names(){return this.nodes.reduce((I,U)=>P(I,U.names),{})}}class v extends g{render(I){return"{"+I._n+super.render(I)+"}"+I._n}}class w extends g{}class b extends v{}b.kind="else";class _ extends v{constructor(I,U){super(U),this.condition=I}render(I){let U=`if(${this.condition})`+super.render(I);return this.else&&(U+="else "+this.else.render(I)),U}optimizeNodes(){super.optimizeNodes();const I=this.condition;if(I===!0)return this.nodes;let U=this.else;if(U){const Y=U.optimizeNodes();U=this.else=Array.isArray(Y)?new b(Y):Y}if(U)return I===!1?U instanceof _?U:U.nodes:this.nodes.length?this:new _(B(I),U instanceof _?[U]:U.nodes);if(!(I===!1||!this.nodes.length))return this}optimizeNames(I,U){var Y;if(this.else=(Y=this.else)===null||Y===void 0?void 0:Y.optimizeNames(I,U),!!(super.optimizeNames(I,U)||this.else))return this.condition=D(this.condition,I,U),this}get names(){const I=super.names;return q(I,this.condition),this.else&&P(I,this.else.names),I}}_.kind="if";class S extends v{}S.kind="for";class x extends S{constructor(I){super(),this.iteration=I}render(I){return`for(${this.iteration})`+super.render(I)}optimizeNames(I,U){if(super.optimizeNames(I,U))return this.iteration=D(this.iteration,I,U),this}get names(){return P(super.names,this.iteration.names)}}class A extends S{constructor(I,U,Y,ne){super(),this.varKind=I,this.name=U,this.from=Y,this.to=ne}render(I){const U=I.es5?n.varKinds.var:this.varKind,{name:Y,from:ne,to:ae}=this;return`for(${U} ${Y}=${ne}; ${Y}<${ae}; ${Y}++)`+super.render(I)}get names(){const I=q(super.names,this.from);return q(I,this.to)}}class k extends S{constructor(I,U,Y,ne){super(),this.loop=I,this.varKind=U,this.name=Y,this.iterable=ne}render(I){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(I)}optimizeNames(I,U){if(super.optimizeNames(I,U))return this.iterable=D(this.iterable,I,U),this}get names(){return P(super.names,this.iterable.names)}}class T extends v{constructor(I,U,Y){super(),this.name=I,this.args=U,this.async=Y}render(I){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(I)}}T.kind="func";class O extends g{render(I){return"return "+super.render(I)}}O.kind="return";class $ extends v{render(I){let U="try"+super.render(I);return this.catch&&(U+=this.catch.render(I)),this.finally&&(U+=this.finally.render(I)),U}optimizeNodes(){var I,U;return super.optimizeNodes(),(I=this.catch)===null||I===void 0||I.optimizeNodes(),(U=this.finally)===null||U===void 0||U.optimizeNodes(),this}optimizeNames(I,U){var Y,ne;return super.optimizeNames(I,U),(Y=this.catch)===null||Y===void 0||Y.optimizeNames(I,U),(ne=this.finally)===null||ne===void 0||ne.optimizeNames(I,U),this}get names(){const I=super.names;return this.catch&&P(I,this.catch.names),this.finally&&P(I,this.finally.names),I}}class L extends v{constructor(I){super(),this.error=I}render(I){return`catch(${this.error})`+super.render(I)}}L.kind="catch";class M extends v{render(I){return"finally"+super.render(I)}}M.kind="finally";class z{constructor(I,U={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...U,_n:U.lines?`
|
|
262
|
+
`:""},this._extScope=I,this._scope=new n.Scope({parent:I}),this._nodes=[new w]}toString(){return this._root.render(this.opts)}name(I){return this._scope.name(I)}scopeName(I){return this._extScope.name(I)}scopeValue(I,U){const Y=this._extScope.value(I,U);return(this._values[Y.prefix]||(this._values[Y.prefix]=new Set)).add(Y),Y}getScopeValue(I,U){return this._extScope.getValue(I,U)}scopeRefs(I){return this._extScope.scopeRefs(I,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(I,U,Y,ne){const ae=this._scope.toName(U);return Y!==void 0&&ne&&(this._constants[ae.str]=Y),this._leafNode(new o(I,ae,Y)),ae}const(I,U,Y){return this._def(n.varKinds.const,I,U,Y)}let(I,U,Y){return this._def(n.varKinds.let,I,U,Y)}var(I,U,Y){return this._def(n.varKinds.var,I,U,Y)}assign(I,U,Y){return this._leafNode(new l(I,U,Y))}add(I,U){return this._leafNode(new c(I,e.operators.ADD,U))}code(I){return typeof I=="function"?I():I!==t.nil&&this._leafNode(new m(I)),this}object(...I){const U=["{"];for(const[Y,ne]of I)U.length>1&&U.push(","),U.push(Y),(Y!==ne||this.opts.es5)&&(U.push(":"),(0,t.addCodeArg)(U,ne));return U.push("}"),new t._Code(U)}if(I,U,Y){if(this._blockNode(new _(I)),U&&Y)this.code(U).else().code(Y).endIf();else if(U)this.code(U).endIf();else if(Y)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(I){return this._elseNode(new _(I))}else(){return this._elseNode(new b)}endIf(){return this._endBlockNode(_,b)}_for(I,U){return this._blockNode(I),U&&this.code(U).endFor(),this}for(I,U){return this._for(new x(I),U)}forRange(I,U,Y,ne,ae=this.opts.es5?n.varKinds.var:n.varKinds.let){const re=this._scope.toName(I);return this._for(new A(ae,re,U,Y),()=>ne(re))}forOf(I,U,Y,ne=n.varKinds.const){const ae=this._scope.toName(I);if(this.opts.es5){const re=U instanceof t.Name?U:this.var("_arr",U);return this.forRange("_i",0,(0,t._)`${re}.length`,le=>{this.var(ae,(0,t._)`${re}[${le}]`),Y(ae)})}return this._for(new k("of",ne,ae,U),()=>Y(ae))}forIn(I,U,Y,ne=this.opts.es5?n.varKinds.var:n.varKinds.const){if(this.opts.ownProperties)return this.forOf(I,(0,t._)`Object.keys(${U})`,Y);const ae=this._scope.toName(I);return this._for(new k("in",ne,ae,U),()=>Y(ae))}endFor(){return this._endBlockNode(S)}label(I){return this._leafNode(new f(I))}break(I){return this._leafNode(new d(I))}return(I){const U=new O;if(this._blockNode(U),this.code(I),U.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(O)}try(I,U,Y){if(!U&&!Y)throw new Error('CodeGen: "try" without "catch" and "finally"');const ne=new $;if(this._blockNode(ne),this.code(I),U){const ae=this.name("e");this._currNode=ne.catch=new L(ae),U(ae)}return Y&&(this._currNode=ne.finally=new M,this.code(Y)),this._endBlockNode(L,M)}throw(I){return this._leafNode(new h(I))}block(I,U){return this._blockStarts.push(this._nodes.length),I&&this.code(I).endBlock(U),this}endBlock(I){const U=this._blockStarts.pop();if(U===void 0)throw new Error("CodeGen: not in self-balancing block");const Y=this._nodes.length-U;if(Y<0||I!==void 0&&Y!==I)throw new Error(`CodeGen: wrong number of nodes: ${Y} vs ${I} expected`);return this._nodes.length=U,this}func(I,U=t.nil,Y,ne){return this._blockNode(new T(I,U,Y)),ne&&this.code(ne).endFunc(),this}endFunc(){return this._endBlockNode(T)}optimize(I=1){for(;I-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(I){return this._currNode.nodes.push(I),this}_blockNode(I){this._currNode.nodes.push(I),this._nodes.push(I)}_endBlockNode(I,U){const Y=this._currNode;if(Y instanceof I||U&&Y instanceof U)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${U?`${I.kind}/${U.kind}`:I.kind}"`)}_elseNode(I){const U=this._currNode;if(!(U instanceof _))throw new Error('CodeGen: "else" without "if"');return this._currNode=U.else=I,this}get _root(){return this._nodes[0]}get _currNode(){const I=this._nodes;return I[I.length-1]}set _currNode(I){const U=this._nodes;U[U.length-1]=I}}e.CodeGen=z;function P(j,I){for(const U in I)j[U]=(j[U]||0)+(I[U]||0);return j}function q(j,I){return I instanceof t._CodeOrName?P(j,I.names):j}function D(j,I,U){if(j instanceof t.Name)return Y(j);if(!ne(j))return j;return new t._Code(j._items.reduce((ae,re)=>(re instanceof t.Name&&(re=Y(re)),re instanceof t._Code?ae.push(...re._items):ae.push(re),ae),[]));function Y(ae){const re=U[ae.str];return re===void 0||I[ae.str]!==1?ae:(delete I[ae.str],re)}function ne(ae){return ae instanceof t._Code&&ae._items.some(re=>re instanceof t.Name&&I[re.str]===1&&U[re.str]!==void 0)}}function H(j,I){for(const U in I)j[U]=(j[U]||0)-(I[U]||0)}function B(j){return typeof j=="boolean"||typeof j=="number"||j===null?!j:(0,t._)`!${X(j)}`}e.not=B;const G=V(e.operators.AND);function K(...j){return j.reduce(G)}e.and=K;const Q=V(e.operators.OR);function R(...j){return j.reduce(Q)}e.or=R;function V(j){return(I,U)=>I===t.nil?U:U===t.nil?I:(0,t._)`${X(I)} ${j} ${X(U)}`}function X(j){return j instanceof t.Name?j:(0,t._)`(${j})`}}(Fx)),Fx}var Ke={},$D;function ht(){if($D)return Ke;$D=1,Object.defineProperty(Ke,"__esModule",{value:!0}),Ke.checkStrictMode=Ke.getErrorPath=Ke.Type=Ke.useFunc=Ke.setEvaluated=Ke.evaluatedPropsToName=Ke.mergeEvaluated=Ke.eachItem=Ke.unescapeJsonPointer=Ke.escapeJsonPointer=Ke.escapeFragment=Ke.unescapeFragment=Ke.schemaRefOrVal=Ke.schemaHasRulesButRef=Ke.schemaHasRules=Ke.checkUnknownRules=Ke.alwaysValidSchema=Ke.toHash=void 0;const e=Xe(),t=gp();function n(k){const T={};for(const O of k)T[O]=!0;return T}Ke.toHash=n;function r(k,T){return typeof T=="boolean"?T:Object.keys(T).length===0?!0:(i(k,T),!a(T,k.self.RULES.all))}Ke.alwaysValidSchema=r;function i(k,T=k.schema){const{opts:O,self:$}=k;if(!O.strictSchema||typeof T=="boolean")return;const L=$.RULES.keywords;for(const M in T)L[M]||A(k,`unknown keyword: "${M}"`)}Ke.checkUnknownRules=i;function a(k,T){if(typeof k=="boolean")return!k;for(const O in k)if(T[O])return!0;return!1}Ke.schemaHasRules=a;function o(k,T){if(typeof k=="boolean")return!k;for(const O in k)if(O!=="$ref"&&T.all[O])return!0;return!1}Ke.schemaHasRulesButRef=o;function l({topSchemaRef:k,schemaPath:T},O,$,L){if(!L){if(typeof O=="number"||typeof O=="boolean")return O;if(typeof O=="string")return(0,e._)`${O}`}return(0,e._)`${k}${T}${(0,e.getProperty)($)}`}Ke.schemaRefOrVal=l;function c(k){return h(decodeURIComponent(k))}Ke.unescapeFragment=c;function f(k){return encodeURIComponent(d(k))}Ke.escapeFragment=f;function d(k){return typeof k=="number"?`${k}`:k.replace(/~/g,"~0").replace(/\//g,"~1")}Ke.escapeJsonPointer=d;function h(k){return k.replace(/~1/g,"/").replace(/~0/g,"~")}Ke.unescapeJsonPointer=h;function m(k,T){if(Array.isArray(k))for(const O of k)T(O);else T(k)}Ke.eachItem=m;function g({mergeNames:k,mergeToName:T,mergeValues:O,resultToName:$}){return(L,M,z,P)=>{const q=z===void 0?M:z instanceof e.Name?(M instanceof e.Name?k(L,M,z):T(L,M,z),z):M instanceof e.Name?(T(L,z,M),M):O(M,z);return P===e.Name&&!(q instanceof e.Name)?$(L,q):q}}Ke.mergeEvaluated={props:g({mergeNames:(k,T,O)=>k.if((0,e._)`${O} !== true && ${T} !== undefined`,()=>{k.if((0,e._)`${T} === true`,()=>k.assign(O,!0),()=>k.assign(O,(0,e._)`${O} || {}`).code((0,e._)`Object.assign(${O}, ${T})`))}),mergeToName:(k,T,O)=>k.if((0,e._)`${O} !== true`,()=>{T===!0?k.assign(O,!0):(k.assign(O,(0,e._)`${O} || {}`),w(k,O,T))}),mergeValues:(k,T)=>k===!0?!0:{...k,...T},resultToName:v}),items:g({mergeNames:(k,T,O)=>k.if((0,e._)`${O} !== true && ${T} !== undefined`,()=>k.assign(O,(0,e._)`${T} === true ? true : ${O} > ${T} ? ${O} : ${T}`)),mergeToName:(k,T,O)=>k.if((0,e._)`${O} !== true`,()=>k.assign(O,T===!0?!0:(0,e._)`${O} > ${T} ? ${O} : ${T}`)),mergeValues:(k,T)=>k===!0?!0:Math.max(k,T),resultToName:(k,T)=>k.var("items",T)})};function v(k,T){if(T===!0)return k.var("props",!0);const O=k.var("props",(0,e._)`{}`);return T!==void 0&&w(k,O,T),O}Ke.evaluatedPropsToName=v;function w(k,T,O){Object.keys(O).forEach($=>k.assign((0,e._)`${T}${(0,e.getProperty)($)}`,!0))}Ke.setEvaluated=w;const b={};function _(k,T){return k.scopeValue("func",{ref:T,code:b[T.code]||(b[T.code]=new t._Code(T.code))})}Ke.useFunc=_;var S;(function(k){k[k.Num=0]="Num",k[k.Str=1]="Str"})(S||(Ke.Type=S={}));function x(k,T,O){if(k instanceof e.Name){const $=T===S.Num;return O?$?(0,e._)`"[" + ${k} + "]"`:(0,e._)`"['" + ${k} + "']"`:$?(0,e._)`"/" + ${k}`:(0,e._)`"/" + ${k}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return O?(0,e.getProperty)(k).toString():"/"+d(k)}Ke.getErrorPath=x;function A(k,T,O=k.opts.strictSchema){if(O){if(T=`strict mode: ${T}`,O===!0)throw new Error(T);k.self.logger.warn(T)}}return Ke.checkStrictMode=A,Ke}var Id={},DD;function La(){if(DD)return Id;DD=1,Object.defineProperty(Id,"__esModule",{value:!0});const e=Xe(),t={data:new e.Name("data"),valCxt:new e.Name("valCxt"),instancePath:new e.Name("instancePath"),parentData:new e.Name("parentData"),parentDataProperty:new e.Name("parentDataProperty"),rootData:new e.Name("rootData"),dynamicAnchors:new e.Name("dynamicAnchors"),vErrors:new e.Name("vErrors"),errors:new e.Name("errors"),this:new e.Name("this"),self:new e.Name("self"),scope:new e.Name("scope"),json:new e.Name("json"),jsonPos:new e.Name("jsonPos"),jsonLen:new e.Name("jsonLen"),jsonPart:new e.Name("jsonPart")};return Id.default=t,Id}var ID;function pm(){return ID||(ID=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.extendErrors=e.resetErrorsCount=e.reportExtraError=e.reportError=e.keyword$DataError=e.keywordError=void 0;const t=Xe(),n=ht(),r=La();e.keywordError={message:({keyword:b})=>(0,t.str)`must pass "${b}" keyword validation`},e.keyword$DataError={message:({keyword:b,schemaType:_})=>_?(0,t.str)`"${b}" keyword must be ${_} ($data)`:(0,t.str)`"${b}" keyword is invalid ($data)`};function i(b,_=e.keywordError,S,x){const{it:A}=b,{gen:k,compositeRule:T,allErrors:O}=A,$=h(b,_,S);x??(T||O)?c(k,$):f(A,(0,t._)`[${$}]`)}e.reportError=i;function a(b,_=e.keywordError,S){const{it:x}=b,{gen:A,compositeRule:k,allErrors:T}=x,O=h(b,_,S);c(A,O),k||T||f(x,r.default.vErrors)}e.reportExtraError=a;function o(b,_){b.assign(r.default.errors,_),b.if((0,t._)`${r.default.vErrors} !== null`,()=>b.if(_,()=>b.assign((0,t._)`${r.default.vErrors}.length`,_),()=>b.assign(r.default.vErrors,null)))}e.resetErrorsCount=o;function l({gen:b,keyword:_,schemaValue:S,data:x,errsCount:A,it:k}){if(A===void 0)throw new Error("ajv implementation error");const T=b.name("err");b.forRange("i",A,r.default.errors,O=>{b.const(T,(0,t._)`${r.default.vErrors}[${O}]`),b.if((0,t._)`${T}.instancePath === undefined`,()=>b.assign((0,t._)`${T}.instancePath`,(0,t.strConcat)(r.default.instancePath,k.errorPath))),b.assign((0,t._)`${T}.schemaPath`,(0,t.str)`${k.errSchemaPath}/${_}`),k.opts.verbose&&(b.assign((0,t._)`${T}.schema`,S),b.assign((0,t._)`${T}.data`,x))})}e.extendErrors=l;function c(b,_){const S=b.const("err",_);b.if((0,t._)`${r.default.vErrors} === null`,()=>b.assign(r.default.vErrors,(0,t._)`[${S}]`),(0,t._)`${r.default.vErrors}.push(${S})`),b.code((0,t._)`${r.default.errors}++`)}function f(b,_){const{gen:S,validateName:x,schemaEnv:A}=b;A.$async?S.throw((0,t._)`new ${b.ValidationError}(${_})`):(S.assign((0,t._)`${x}.errors`,_),S.return(!1))}const d={keyword:new t.Name("keyword"),schemaPath:new t.Name("schemaPath"),params:new t.Name("params"),propertyName:new t.Name("propertyName"),message:new t.Name("message"),schema:new t.Name("schema"),parentSchema:new t.Name("parentSchema")};function h(b,_,S){const{createErrors:x}=b.it;return x===!1?(0,t._)`{}`:m(b,_,S)}function m(b,_,S={}){const{gen:x,it:A}=b,k=[g(A,S),v(b,S)];return w(b,_,k),x.object(...k)}function g({errorPath:b},{instancePath:_}){const S=_?(0,t.str)`${b}${(0,n.getErrorPath)(_,n.Type.Str)}`:b;return[r.default.instancePath,(0,t.strConcat)(r.default.instancePath,S)]}function v({keyword:b,it:{errSchemaPath:_}},{schemaPath:S,parentSchema:x}){let A=x?_:(0,t.str)`${_}/${b}`;return S&&(A=(0,t.str)`${A}${(0,n.getErrorPath)(S,n.Type.Str)}`),[d.schemaPath,A]}function w(b,{params:_,message:S},x){const{keyword:A,data:k,schemaValue:T,it:O}=b,{opts:$,propertyName:L,topSchemaRef:M,schemaPath:z}=O;x.push([d.keyword,A],[d.params,typeof _=="function"?_(b):_||(0,t._)`{}`]),$.messages&&x.push([d.message,typeof S=="function"?S(b):S]),$.verbose&&x.push([d.schema,T],[d.parentSchema,(0,t._)`${M}${z}`],[r.default.data,k]),L&&x.push([d.propertyName,L])}}(qx)),qx}var PD;function gge(){if(PD)return as;PD=1,Object.defineProperty(as,"__esModule",{value:!0}),as.boolOrEmptySchema=as.topBoolOrEmptySchema=void 0;const e=pm(),t=Xe(),n=La(),r={message:"boolean schema is false"};function i(l){const{gen:c,schema:f,validateName:d}=l;f===!1?o(l,!1):typeof f=="object"&&f.$async===!0?c.return(n.default.data):(c.assign((0,t._)`${d}.errors`,null),c.return(!0))}as.topBoolOrEmptySchema=i;function a(l,c){const{gen:f,schema:d}=l;d===!1?(f.var(c,!1),o(l)):f.var(c,!0)}as.boolOrEmptySchema=a;function o(l,c){const{gen:f,data:d}=l,h={gen:f,keyword:"false schema",data:d,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:l};(0,e.reportError)(h,r,void 0,c)}return as}var pn={},ss={},LD;function YL(){if(LD)return ss;LD=1,Object.defineProperty(ss,"__esModule",{value:!0}),ss.getRules=ss.isJSONType=void 0;const e=["string","number","integer","boolean","null","object","array"],t=new Set(e);function n(i){return typeof i=="string"&&t.has(i)}ss.isJSONType=n;function r(){const i={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...i,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},i.number,i.string,i.array,i.object],post:{rules:[]},all:{},keywords:{}}}return ss.getRules=r,ss}var Ai={},zD;function ZL(){if(zD)return Ai;zD=1,Object.defineProperty(Ai,"__esModule",{value:!0}),Ai.shouldUseRule=Ai.shouldUseGroup=Ai.schemaHasRulesForType=void 0;function e({schema:r,self:i},a){const o=i.RULES.types[a];return o&&o!==!0&&t(r,o)}Ai.schemaHasRulesForType=e;function t(r,i){return i.rules.some(a=>n(r,a))}Ai.shouldUseGroup=t;function n(r,i){var a;return r[i.keyword]!==void 0||((a=i.definition.implements)===null||a===void 0?void 0:a.some(o=>r[o]!==void 0))}return Ai.shouldUseRule=n,Ai}var qD;function yp(){if(qD)return pn;qD=1,Object.defineProperty(pn,"__esModule",{value:!0}),pn.reportTypeError=pn.checkDataTypes=pn.checkDataType=pn.coerceAndCheckDataType=pn.getJSONTypes=pn.getSchemaTypes=pn.DataType=void 0;const e=YL(),t=ZL(),n=pm(),r=Xe(),i=ht();var a;(function(S){S[S.Correct=0]="Correct",S[S.Wrong=1]="Wrong"})(a||(pn.DataType=a={}));function o(S){const x=l(S.type);if(x.includes("null")){if(S.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!x.length&&S.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');S.nullable===!0&&x.push("null")}return x}pn.getSchemaTypes=o;function l(S){const x=Array.isArray(S)?S:S?[S]:[];if(x.every(e.isJSONType))return x;throw new Error("type must be JSONType or JSONType[]: "+x.join(","))}pn.getJSONTypes=l;function c(S,x){const{gen:A,data:k,opts:T}=S,O=d(x,T.coerceTypes),$=x.length>0&&!(O.length===0&&x.length===1&&(0,t.schemaHasRulesForType)(S,x[0]));if($){const L=v(x,k,T.strictNumbers,a.Wrong);A.if(L,()=>{O.length?h(S,x,O):b(S)})}return $}pn.coerceAndCheckDataType=c;const f=new Set(["string","number","integer","boolean","null"]);function d(S,x){return x?S.filter(A=>f.has(A)||x==="array"&&A==="array"):[]}function h(S,x,A){const{gen:k,data:T,opts:O}=S,$=k.let("dataType",(0,r._)`typeof ${T}`),L=k.let("coerced",(0,r._)`undefined`);O.coerceTypes==="array"&&k.if((0,r._)`${$} == 'object' && Array.isArray(${T}) && ${T}.length == 1`,()=>k.assign(T,(0,r._)`${T}[0]`).assign($,(0,r._)`typeof ${T}`).if(v(x,T,O.strictNumbers),()=>k.assign(L,T))),k.if((0,r._)`${L} !== undefined`);for(const z of A)(f.has(z)||z==="array"&&O.coerceTypes==="array")&&M(z);k.else(),b(S),k.endIf(),k.if((0,r._)`${L} !== undefined`,()=>{k.assign(T,L),m(S,L)});function M(z){switch(z){case"string":k.elseIf((0,r._)`${$} == "number" || ${$} == "boolean"`).assign(L,(0,r._)`"" + ${T}`).elseIf((0,r._)`${T} === null`).assign(L,(0,r._)`""`);return;case"number":k.elseIf((0,r._)`${$} == "boolean" || ${T} === null
|
|
263
|
+
|| (${$} == "string" && ${T} && ${T} == +${T})`).assign(L,(0,r._)`+${T}`);return;case"integer":k.elseIf((0,r._)`${$} === "boolean" || ${T} === null
|
|
264
|
+
|| (${$} === "string" && ${T} && ${T} == +${T} && !(${T} % 1))`).assign(L,(0,r._)`+${T}`);return;case"boolean":k.elseIf((0,r._)`${T} === "false" || ${T} === 0 || ${T} === null`).assign(L,!1).elseIf((0,r._)`${T} === "true" || ${T} === 1`).assign(L,!0);return;case"null":k.elseIf((0,r._)`${T} === "" || ${T} === 0 || ${T} === false`),k.assign(L,null);return;case"array":k.elseIf((0,r._)`${$} === "string" || ${$} === "number"
|
|
265
|
+
|| ${$} === "boolean" || ${T} === null`).assign(L,(0,r._)`[${T}]`)}}}function m({gen:S,parentData:x,parentDataProperty:A},k){S.if((0,r._)`${x} !== undefined`,()=>S.assign((0,r._)`${x}[${A}]`,k))}function g(S,x,A,k=a.Correct){const T=k===a.Correct?r.operators.EQ:r.operators.NEQ;let O;switch(S){case"null":return(0,r._)`${x} ${T} null`;case"array":O=(0,r._)`Array.isArray(${x})`;break;case"object":O=(0,r._)`${x} && typeof ${x} == "object" && !Array.isArray(${x})`;break;case"integer":O=$((0,r._)`!(${x} % 1) && !isNaN(${x})`);break;case"number":O=$();break;default:return(0,r._)`typeof ${x} ${T} ${S}`}return k===a.Correct?O:(0,r.not)(O);function $(L=r.nil){return(0,r.and)((0,r._)`typeof ${x} == "number"`,L,A?(0,r._)`isFinite(${x})`:r.nil)}}pn.checkDataType=g;function v(S,x,A,k){if(S.length===1)return g(S[0],x,A,k);let T;const O=(0,i.toHash)(S);if(O.array&&O.object){const $=(0,r._)`typeof ${x} != "object"`;T=O.null?$:(0,r._)`!${x} || ${$}`,delete O.null,delete O.array,delete O.object}else T=r.nil;O.number&&delete O.integer;for(const $ in O)T=(0,r.and)(T,g($,x,A,k));return T}pn.checkDataTypes=v;const w={message:({schema:S})=>`must be ${S}`,params:({schema:S,schemaValue:x})=>typeof S=="string"?(0,r._)`{type: ${S}}`:(0,r._)`{type: ${x}}`};function b(S){const x=_(S);(0,n.reportError)(x,w)}pn.reportTypeError=b;function _(S){const{gen:x,data:A,schema:k}=S,T=(0,i.schemaRefOrVal)(S,k,"type");return{gen:x,keyword:"type",data:A,schema:k.type,schemaCode:T,schemaValue:T,parentSchema:k,params:{},it:S}}return pn}var Mu={},FD;function yge(){if(FD)return Mu;FD=1,Object.defineProperty(Mu,"__esModule",{value:!0}),Mu.assignDefaults=void 0;const e=Xe(),t=ht();function n(i,a){const{properties:o,items:l}=i.schema;if(a==="object"&&o)for(const c in o)r(i,c,o[c].default);else a==="array"&&Array.isArray(l)&&l.forEach((c,f)=>r(i,f,c.default))}Mu.assignDefaults=n;function r(i,a,o){const{gen:l,compositeRule:c,data:f,opts:d}=i;if(o===void 0)return;const h=(0,e._)`${f}${(0,e.getProperty)(a)}`;if(c){(0,t.checkStrictMode)(i,`default is ignored for: ${h}`);return}let m=(0,e._)`${h} === undefined`;d.useDefaults==="empty"&&(m=(0,e._)`${m} || ${h} === null || ${h} === ""`),l.if(m,(0,e._)`${h} = ${(0,e.stringify)(o)}`)}return Mu}var Or={},_t={},BD;function Lr(){if(BD)return _t;BD=1,Object.defineProperty(_t,"__esModule",{value:!0}),_t.validateUnion=_t.validateArray=_t.usePattern=_t.callValidateCode=_t.schemaProperties=_t.allSchemaProperties=_t.noPropertyInData=_t.propertyInData=_t.isOwnProperty=_t.hasPropFunc=_t.reportMissingProp=_t.checkMissingProp=_t.checkReportMissingProp=void 0;const e=Xe(),t=ht(),n=La(),r=ht();function i(S,x){const{gen:A,data:k,it:T}=S;A.if(d(A,k,x,T.opts.ownProperties),()=>{S.setParams({missingProperty:(0,e._)`${x}`},!0),S.error()})}_t.checkReportMissingProp=i;function a({gen:S,data:x,it:{opts:A}},k,T){return(0,e.or)(...k.map(O=>(0,e.and)(d(S,x,O,A.ownProperties),(0,e._)`${T} = ${O}`)))}_t.checkMissingProp=a;function o(S,x){S.setParams({missingProperty:x},!0),S.error()}_t.reportMissingProp=o;function l(S){return S.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,e._)`Object.prototype.hasOwnProperty`})}_t.hasPropFunc=l;function c(S,x,A){return(0,e._)`${l(S)}.call(${x}, ${A})`}_t.isOwnProperty=c;function f(S,x,A,k){const T=(0,e._)`${x}${(0,e.getProperty)(A)} !== undefined`;return k?(0,e._)`${T} && ${c(S,x,A)}`:T}_t.propertyInData=f;function d(S,x,A,k){const T=(0,e._)`${x}${(0,e.getProperty)(A)} === undefined`;return k?(0,e.or)(T,(0,e.not)(c(S,x,A))):T}_t.noPropertyInData=d;function h(S){return S?Object.keys(S).filter(x=>x!=="__proto__"):[]}_t.allSchemaProperties=h;function m(S,x){return h(x).filter(A=>!(0,t.alwaysValidSchema)(S,x[A]))}_t.schemaProperties=m;function g({schemaCode:S,data:x,it:{gen:A,topSchemaRef:k,schemaPath:T,errorPath:O},it:$},L,M,z){const P=z?(0,e._)`${S}, ${x}, ${k}${T}`:x,q=[[n.default.instancePath,(0,e.strConcat)(n.default.instancePath,O)],[n.default.parentData,$.parentData],[n.default.parentDataProperty,$.parentDataProperty],[n.default.rootData,n.default.rootData]];$.opts.dynamicRef&&q.push([n.default.dynamicAnchors,n.default.dynamicAnchors]);const D=(0,e._)`${P}, ${A.object(...q)}`;return M!==e.nil?(0,e._)`${L}.call(${M}, ${D})`:(0,e._)`${L}(${D})`}_t.callValidateCode=g;const v=(0,e._)`new RegExp`;function w({gen:S,it:{opts:x}},A){const k=x.unicodeRegExp?"u":"",{regExp:T}=x.code,O=T(A,k);return S.scopeValue("pattern",{key:O.toString(),ref:O,code:(0,e._)`${T.code==="new RegExp"?v:(0,r.useFunc)(S,T)}(${A}, ${k})`})}_t.usePattern=w;function b(S){const{gen:x,data:A,keyword:k,it:T}=S,O=x.name("valid");if(T.allErrors){const L=x.let("valid",!0);return $(()=>x.assign(L,!1)),L}return x.var(O,!0),$(()=>x.break()),O;function $(L){const M=x.const("len",(0,e._)`${A}.length`);x.forRange("i",0,M,z=>{S.subschema({keyword:k,dataProp:z,dataPropType:t.Type.Num},O),x.if((0,e.not)(O),L)})}}_t.validateArray=b;function _(S){const{gen:x,schema:A,keyword:k,it:T}=S;if(!Array.isArray(A))throw new Error("ajv implementation error");if(A.some(M=>(0,t.alwaysValidSchema)(T,M))&&!T.opts.unevaluated)return;const $=x.let("valid",!1),L=x.name("_valid");x.block(()=>A.forEach((M,z)=>{const P=S.subschema({keyword:k,schemaProp:z,compositeRule:!0},L);x.assign($,(0,e._)`${$} || ${L}`),S.mergeValidEvaluated(P,L)||x.if((0,e.not)($))})),S.result($,()=>S.reset(),()=>S.error(!0))}return _t.validateUnion=_,_t}var UD;function bge(){if(UD)return Or;UD=1,Object.defineProperty(Or,"__esModule",{value:!0}),Or.validateKeywordUsage=Or.validSchemaType=Or.funcKeywordCode=Or.macroKeywordCode=void 0;const e=Xe(),t=La(),n=Lr(),r=pm();function i(m,g){const{gen:v,keyword:w,schema:b,parentSchema:_,it:S}=m,x=g.macro.call(S.self,b,_,S),A=f(v,w,x);S.opts.validateSchema!==!1&&S.self.validateSchema(x,!0);const k=v.name("valid");m.subschema({schema:x,schemaPath:e.nil,errSchemaPath:`${S.errSchemaPath}/${w}`,topSchemaRef:A,compositeRule:!0},k),m.pass(k,()=>m.error(!0))}Or.macroKeywordCode=i;function a(m,g){var v;const{gen:w,keyword:b,schema:_,parentSchema:S,$data:x,it:A}=m;c(A,g);const k=!x&&g.compile?g.compile.call(A.self,_,S,A):g.validate,T=f(w,b,k),O=w.let("valid");m.block$data(O,$),m.ok((v=g.valid)!==null&&v!==void 0?v:O);function $(){if(g.errors===!1)z(),g.modifying&&o(m),P(()=>m.error());else{const q=g.async?L():M();g.modifying&&o(m),P(()=>l(m,q))}}function L(){const q=w.let("ruleErrs",null);return w.try(()=>z((0,e._)`await `),D=>w.assign(O,!1).if((0,e._)`${D} instanceof ${A.ValidationError}`,()=>w.assign(q,(0,e._)`${D}.errors`),()=>w.throw(D))),q}function M(){const q=(0,e._)`${T}.errors`;return w.assign(q,null),z(e.nil),q}function z(q=g.async?(0,e._)`await `:e.nil){const D=A.opts.passContext?t.default.this:t.default.self,H=!("compile"in g&&!x||g.schema===!1);w.assign(O,(0,e._)`${q}${(0,n.callValidateCode)(m,T,D,H)}`,g.modifying)}function P(q){var D;w.if((0,e.not)((D=g.valid)!==null&&D!==void 0?D:O),q)}}Or.funcKeywordCode=a;function o(m){const{gen:g,data:v,it:w}=m;g.if(w.parentData,()=>g.assign(v,(0,e._)`${w.parentData}[${w.parentDataProperty}]`))}function l(m,g){const{gen:v}=m;v.if((0,e._)`Array.isArray(${g})`,()=>{v.assign(t.default.vErrors,(0,e._)`${t.default.vErrors} === null ? ${g} : ${t.default.vErrors}.concat(${g})`).assign(t.default.errors,(0,e._)`${t.default.vErrors}.length`),(0,r.extendErrors)(m)},()=>m.error())}function c({schemaEnv:m},g){if(g.async&&!m.$async)throw new Error("async keyword in sync schema")}function f(m,g,v){if(v===void 0)throw new Error(`keyword "${g}" failed to compile`);return m.scopeValue("keyword",typeof v=="function"?{ref:v}:{ref:v,code:(0,e.stringify)(v)})}function d(m,g,v=!1){return!g.length||g.some(w=>w==="array"?Array.isArray(m):w==="object"?m&&typeof m=="object"&&!Array.isArray(m):typeof m==w||v&&typeof m>"u")}Or.validSchemaType=d;function h({schema:m,opts:g,self:v,errSchemaPath:w},b,_){if(Array.isArray(b.keyword)?!b.keyword.includes(_):b.keyword!==_)throw new Error("ajv implementation error");const S=b.dependencies;if(S!=null&&S.some(x=>!Object.prototype.hasOwnProperty.call(m,x)))throw new Error(`parent schema must have dependencies of ${_}: ${S.join(",")}`);if(b.validateSchema&&!b.validateSchema(m[_])){const A=`keyword "${_}" value is invalid at path "${w}": `+v.errorsText(b.validateSchema.errors);if(g.validateSchema==="log")v.logger.error(A);else throw new Error(A)}}return Or.validateKeywordUsage=h,Or}var Ti={},VD;function vge(){if(VD)return Ti;VD=1,Object.defineProperty(Ti,"__esModule",{value:!0}),Ti.extendSubschemaMode=Ti.extendSubschemaData=Ti.getSubschema=void 0;const e=Xe(),t=ht();function n(a,{keyword:o,schemaProp:l,schema:c,schemaPath:f,errSchemaPath:d,topSchemaRef:h}){if(o!==void 0&&c!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(o!==void 0){const m=a.schema[o];return l===void 0?{schema:m,schemaPath:(0,e._)`${a.schemaPath}${(0,e.getProperty)(o)}`,errSchemaPath:`${a.errSchemaPath}/${o}`}:{schema:m[l],schemaPath:(0,e._)`${a.schemaPath}${(0,e.getProperty)(o)}${(0,e.getProperty)(l)}`,errSchemaPath:`${a.errSchemaPath}/${o}/${(0,t.escapeFragment)(l)}`}}if(c!==void 0){if(f===void 0||d===void 0||h===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:c,schemaPath:f,topSchemaRef:h,errSchemaPath:d}}throw new Error('either "keyword" or "schema" must be passed')}Ti.getSubschema=n;function r(a,o,{dataProp:l,dataPropType:c,data:f,dataTypes:d,propertyName:h}){if(f!==void 0&&l!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:m}=o;if(l!==void 0){const{errorPath:v,dataPathArr:w,opts:b}=o,_=m.let("data",(0,e._)`${o.data}${(0,e.getProperty)(l)}`,!0);g(_),a.errorPath=(0,e.str)`${v}${(0,t.getErrorPath)(l,c,b.jsPropertySyntax)}`,a.parentDataProperty=(0,e._)`${l}`,a.dataPathArr=[...w,a.parentDataProperty]}if(f!==void 0){const v=f instanceof e.Name?f:m.let("data",f,!0);g(v),h!==void 0&&(a.propertyName=h)}d&&(a.dataTypes=d);function g(v){a.data=v,a.dataLevel=o.dataLevel+1,a.dataTypes=[],o.definedProperties=new Set,a.parentData=o.data,a.dataNames=[...o.dataNames,v]}}Ti.extendSubschemaData=r;function i(a,{jtdDiscriminator:o,jtdMetadata:l,compositeRule:c,createErrors:f,allErrors:d}){c!==void 0&&(a.compositeRule=c),f!==void 0&&(a.createErrors=f),d!==void 0&&(a.allErrors=d),a.jtdDiscriminator=o,a.jtdMetadata=l}return Ti.extendSubschemaMode=i,Ti}var kn={},Vx,HD;function KL(){return HD||(HD=1,Vx=function e(t,n){if(t===n)return!0;if(t&&n&&typeof t=="object"&&typeof n=="object"){if(t.constructor!==n.constructor)return!1;var r,i,a;if(Array.isArray(t)){if(r=t.length,r!=n.length)return!1;for(i=r;i--!==0;)if(!e(t[i],n[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if(a=Object.keys(t),r=a.length,r!==Object.keys(n).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(n,a[i]))return!1;for(i=r;i--!==0;){var o=a[i];if(!e(t[o],n[o]))return!1}return!0}return t!==t&&n!==n}),Vx}var Hx={exports:{}},GD;function _ge(){if(GD)return Hx.exports;GD=1;var e=Hx.exports=function(r,i,a){typeof i=="function"&&(a=i,i={}),a=i.cb||a;var o=typeof a=="function"?a:a.pre||function(){},l=a.post||function(){};t(i,o,l,r,"",r)};e.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},e.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},e.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},e.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function t(r,i,a,o,l,c,f,d,h,m){if(o&&typeof o=="object"&&!Array.isArray(o)){i(o,l,c,f,d,h,m);for(var g in o){var v=o[g];if(Array.isArray(v)){if(g in e.arrayKeywords)for(var w=0;w<v.length;w++)t(r,i,a,v[w],l+"/"+g+"/"+w,c,l,g,o,w)}else if(g in e.propsKeywords){if(v&&typeof v=="object")for(var b in v)t(r,i,a,v[b],l+"/"+g+"/"+n(b),c,l,g,o,b)}else(g in e.keywords||r.allKeys&&!(g in e.skipKeywords))&&t(r,i,a,v,l+"/"+g,c,l,g,o)}a(o,l,c,f,d,h,m)}}function n(r){return r.replace(/~/g,"~0").replace(/\//g,"~1")}return Hx.exports}var YD;function mm(){if(YD)return kn;YD=1,Object.defineProperty(kn,"__esModule",{value:!0}),kn.getSchemaRefs=kn.resolveUrl=kn.normalizeId=kn._getFullPath=kn.getFullPath=kn.inlineRef=void 0;const e=ht(),t=KL(),n=_ge(),r=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function i(w,b=!0){return typeof w=="boolean"?!0:b===!0?!o(w):b?l(w)<=b:!1}kn.inlineRef=i;const a=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function o(w){for(const b in w){if(a.has(b))return!0;const _=w[b];if(Array.isArray(_)&&_.some(o)||typeof _=="object"&&o(_))return!0}return!1}function l(w){let b=0;for(const _ in w){if(_==="$ref")return 1/0;if(b++,!r.has(_)&&(typeof w[_]=="object"&&(0,e.eachItem)(w[_],S=>b+=l(S)),b===1/0))return 1/0}return b}function c(w,b="",_){_!==!1&&(b=h(b));const S=w.parse(b);return f(w,S)}kn.getFullPath=c;function f(w,b){return w.serialize(b).split("#")[0]+"#"}kn._getFullPath=f;const d=/#\/?$/;function h(w){return w?w.replace(d,""):""}kn.normalizeId=h;function m(w,b,_){return _=h(_),w.resolve(b,_)}kn.resolveUrl=m;const g=/^[a-z_][-a-z0-9._]*$/i;function v(w,b){if(typeof w=="boolean")return{};const{schemaId:_,uriResolver:S}=this.opts,x=h(w[_]||b),A={"":x},k=c(S,x,!1),T={},O=new Set;return n(w,{allKeys:!0},(M,z,P,q)=>{if(q===void 0)return;const D=k+z;let H=A[q];typeof M[_]=="string"&&(H=B.call(this,M[_])),G.call(this,M.$anchor),G.call(this,M.$dynamicAnchor),A[z]=H;function B(K){const Q=this.opts.uriResolver.resolve;if(K=h(H?Q(H,K):K),O.has(K))throw L(K);O.add(K);let R=this.refs[K];return typeof R=="string"&&(R=this.refs[R]),typeof R=="object"?$(M,R.schema,K):K!==h(D)&&(K[0]==="#"?($(M,T[K],K),T[K]=M):this.refs[K]=D),K}function G(K){if(typeof K=="string"){if(!g.test(K))throw new Error(`invalid anchor "${K}"`);B.call(this,`#${K}`)}}}),T;function $(M,z,P){if(z!==void 0&&!t(M,z))throw L(P)}function L(M){return new Error(`reference "${M}" resolves to more than one schema`)}}return kn.getSchemaRefs=v,kn}var ZD;function gm(){if(ZD)return ki;ZD=1,Object.defineProperty(ki,"__esModule",{value:!0}),ki.getData=ki.KeywordCxt=ki.validateFunctionCode=void 0;const e=gge(),t=yp(),n=ZL(),r=yp(),i=yge(),a=bge(),o=vge(),l=Xe(),c=La(),f=mm(),d=ht(),h=pm();function m(W){if(k(W)&&(O(W),A(W))){b(W);return}g(W,()=>(0,e.topBoolOrEmptySchema)(W))}ki.validateFunctionCode=m;function g({gen:W,validateName:J,schema:se,schemaEnv:fe,opts:me},xe){me.code.es5?W.func(J,(0,l._)`${c.default.data}, ${c.default.valCxt}`,fe.$async,()=>{W.code((0,l._)`"use strict"; ${S(se,me)}`),w(W,me),W.code(xe)}):W.func(J,(0,l._)`${c.default.data}, ${v(me)}`,fe.$async,()=>W.code(S(se,me)).code(xe))}function v(W){return(0,l._)`{${c.default.instancePath}="", ${c.default.parentData}, ${c.default.parentDataProperty}, ${c.default.rootData}=${c.default.data}${W.dynamicRef?(0,l._)`, ${c.default.dynamicAnchors}={}`:l.nil}}={}`}function w(W,J){W.if(c.default.valCxt,()=>{W.var(c.default.instancePath,(0,l._)`${c.default.valCxt}.${c.default.instancePath}`),W.var(c.default.parentData,(0,l._)`${c.default.valCxt}.${c.default.parentData}`),W.var(c.default.parentDataProperty,(0,l._)`${c.default.valCxt}.${c.default.parentDataProperty}`),W.var(c.default.rootData,(0,l._)`${c.default.valCxt}.${c.default.rootData}`),J.dynamicRef&&W.var(c.default.dynamicAnchors,(0,l._)`${c.default.valCxt}.${c.default.dynamicAnchors}`)},()=>{W.var(c.default.instancePath,(0,l._)`""`),W.var(c.default.parentData,(0,l._)`undefined`),W.var(c.default.parentDataProperty,(0,l._)`undefined`),W.var(c.default.rootData,c.default.data),J.dynamicRef&&W.var(c.default.dynamicAnchors,(0,l._)`{}`)})}function b(W){const{schema:J,opts:se,gen:fe}=W;g(W,()=>{se.$comment&&J.$comment&&q(W),M(W),fe.let(c.default.vErrors,null),fe.let(c.default.errors,0),se.unevaluated&&_(W),$(W),D(W)})}function _(W){const{gen:J,validateName:se}=W;W.evaluated=J.const("evaluated",(0,l._)`${se}.evaluated`),J.if((0,l._)`${W.evaluated}.dynamicProps`,()=>J.assign((0,l._)`${W.evaluated}.props`,(0,l._)`undefined`)),J.if((0,l._)`${W.evaluated}.dynamicItems`,()=>J.assign((0,l._)`${W.evaluated}.items`,(0,l._)`undefined`))}function S(W,J){const se=typeof W=="object"&&W[J.schemaId];return se&&(J.code.source||J.code.process)?(0,l._)`/*# sourceURL=${se} */`:l.nil}function x(W,J){if(k(W)&&(O(W),A(W))){T(W,J);return}(0,e.boolOrEmptySchema)(W,J)}function A({schema:W,self:J}){if(typeof W=="boolean")return!W;for(const se in W)if(J.RULES.all[se])return!0;return!1}function k(W){return typeof W.schema!="boolean"}function T(W,J){const{schema:se,gen:fe,opts:me}=W;me.$comment&&se.$comment&&q(W),z(W),P(W);const xe=fe.const("_errs",c.default.errors);$(W,xe),fe.var(J,(0,l._)`${xe} === ${c.default.errors}`)}function O(W){(0,d.checkUnknownRules)(W),L(W)}function $(W,J){if(W.opts.jtd)return B(W,[],!1,J);const se=(0,t.getSchemaTypes)(W.schema),fe=(0,t.coerceAndCheckDataType)(W,se);B(W,se,!fe,J)}function L(W){const{schema:J,errSchemaPath:se,opts:fe,self:me}=W;J.$ref&&fe.ignoreKeywordsWithRef&&(0,d.schemaHasRulesButRef)(J,me.RULES)&&me.logger.warn(`$ref: keywords ignored in schema at path "${se}"`)}function M(W){const{schema:J,opts:se}=W;J.default!==void 0&&se.useDefaults&&se.strictSchema&&(0,d.checkStrictMode)(W,"default is ignored in the schema root")}function z(W){const J=W.schema[W.opts.schemaId];J&&(W.baseId=(0,f.resolveUrl)(W.opts.uriResolver,W.baseId,J))}function P(W){if(W.schema.$async&&!W.schemaEnv.$async)throw new Error("async schema in sync schema")}function q({gen:W,schemaEnv:J,schema:se,errSchemaPath:fe,opts:me}){const xe=se.$comment;if(me.$comment===!0)W.code((0,l._)`${c.default.self}.logger.log(${xe})`);else if(typeof me.$comment=="function"){const we=(0,l.str)`${fe}/$comment`,Ve=W.scopeValue("root",{ref:J.root});W.code((0,l._)`${c.default.self}.opts.$comment(${xe}, ${we}, ${Ve}.schema)`)}}function D(W){const{gen:J,schemaEnv:se,validateName:fe,ValidationError:me,opts:xe}=W;se.$async?J.if((0,l._)`${c.default.errors} === 0`,()=>J.return(c.default.data),()=>J.throw((0,l._)`new ${me}(${c.default.vErrors})`)):(J.assign((0,l._)`${fe}.errors`,c.default.vErrors),xe.unevaluated&&H(W),J.return((0,l._)`${c.default.errors} === 0`))}function H({gen:W,evaluated:J,props:se,items:fe}){se instanceof l.Name&&W.assign((0,l._)`${J}.props`,se),fe instanceof l.Name&&W.assign((0,l._)`${J}.items`,fe)}function B(W,J,se,fe){const{gen:me,schema:xe,data:we,allErrors:Ve,opts:qe,self:We}=W,{RULES:He}=We;if(xe.$ref&&(qe.ignoreKeywordsWithRef||!(0,d.schemaHasRulesButRef)(xe,He))){me.block(()=>ne(W,"$ref",He.all.$ref.definition));return}qe.jtd||K(W,J),me.block(()=>{for(const Be of He.rules)$e(Be);$e(He.post)});function $e(Be){(0,n.shouldUseGroup)(xe,Be)&&(Be.type?(me.if((0,r.checkDataType)(Be.type,we,qe.strictNumbers)),G(W,Be),J.length===1&&J[0]===Be.type&&se&&(me.else(),(0,r.reportTypeError)(W)),me.endIf()):G(W,Be),Ve||me.if((0,l._)`${c.default.errors} === ${fe||0}`))}}function G(W,J){const{gen:se,schema:fe,opts:{useDefaults:me}}=W;me&&(0,i.assignDefaults)(W,J.type),se.block(()=>{for(const xe of J.rules)(0,n.shouldUseRule)(fe,xe)&&ne(W,xe.keyword,xe.definition,J.type)})}function K(W,J){W.schemaEnv.meta||!W.opts.strictTypes||(Q(W,J),W.opts.allowUnionTypes||R(W,J),V(W,W.dataTypes))}function Q(W,J){if(J.length){if(!W.dataTypes.length){W.dataTypes=J;return}J.forEach(se=>{j(W.dataTypes,se)||U(W,`type "${se}" not allowed by context "${W.dataTypes.join(",")}"`)}),I(W,J)}}function R(W,J){J.length>1&&!(J.length===2&&J.includes("null"))&&U(W,"use allowUnionTypes to allow union type keyword")}function V(W,J){const se=W.self.RULES.all;for(const fe in se){const me=se[fe];if(typeof me=="object"&&(0,n.shouldUseRule)(W.schema,me)){const{type:xe}=me.definition;xe.length&&!xe.some(we=>X(J,we))&&U(W,`missing type "${xe.join(",")}" for keyword "${fe}"`)}}}function X(W,J){return W.includes(J)||J==="number"&&W.includes("integer")}function j(W,J){return W.includes(J)||J==="integer"&&W.includes("number")}function I(W,J){const se=[];for(const fe of W.dataTypes)j(J,fe)?se.push(fe):J.includes("integer")&&fe==="number"&&se.push("integer");W.dataTypes=se}function U(W,J){const se=W.schemaEnv.baseId+W.errSchemaPath;J+=` at "${se}" (strictTypes)`,(0,d.checkStrictMode)(W,J,W.opts.strictTypes)}class Y{constructor(J,se,fe){if((0,a.validateKeywordUsage)(J,se,fe),this.gen=J.gen,this.allErrors=J.allErrors,this.keyword=fe,this.data=J.data,this.schema=J.schema[fe],this.$data=se.$data&&J.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,d.schemaRefOrVal)(J,this.schema,fe,this.$data),this.schemaType=se.schemaType,this.parentSchema=J.schema,this.params={},this.it=J,this.def=se,this.$data)this.schemaCode=J.gen.const("vSchema",le(this.$data,J));else if(this.schemaCode=this.schemaValue,!(0,a.validSchemaType)(this.schema,se.schemaType,se.allowUndefined))throw new Error(`${fe} value must be ${JSON.stringify(se.schemaType)}`);("code"in se?se.trackErrors:se.errors!==!1)&&(this.errsCount=J.gen.const("_errs",c.default.errors))}result(J,se,fe){this.failResult((0,l.not)(J),se,fe)}failResult(J,se,fe){this.gen.if(J),fe?fe():this.error(),se?(this.gen.else(),se(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(J,se){this.failResult((0,l.not)(J),void 0,se)}fail(J){if(J===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(J),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(J){if(!this.$data)return this.fail(J);const{schemaCode:se}=this;this.fail((0,l._)`${se} !== undefined && (${(0,l.or)(this.invalid$data(),J)})`)}error(J,se,fe){if(se){this.setParams(se),this._error(J,fe),this.setParams({});return}this._error(J,fe)}_error(J,se){(J?h.reportExtraError:h.reportError)(this,this.def.error,se)}$dataError(){(0,h.reportError)(this,this.def.$dataError||h.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,h.resetErrorsCount)(this.gen,this.errsCount)}ok(J){this.allErrors||this.gen.if(J)}setParams(J,se){se?Object.assign(this.params,J):this.params=J}block$data(J,se,fe=l.nil){this.gen.block(()=>{this.check$data(J,fe),se()})}check$data(J=l.nil,se=l.nil){if(!this.$data)return;const{gen:fe,schemaCode:me,schemaType:xe,def:we}=this;fe.if((0,l.or)((0,l._)`${me} === undefined`,se)),J!==l.nil&&fe.assign(J,!0),(xe.length||we.validateSchema)&&(fe.elseIf(this.invalid$data()),this.$dataError(),J!==l.nil&&fe.assign(J,!1)),fe.else()}invalid$data(){const{gen:J,schemaCode:se,schemaType:fe,def:me,it:xe}=this;return(0,l.or)(we(),Ve());function we(){if(fe.length){if(!(se instanceof l.Name))throw new Error("ajv implementation error");const qe=Array.isArray(fe)?fe:[fe];return(0,l._)`${(0,r.checkDataTypes)(qe,se,xe.opts.strictNumbers,r.DataType.Wrong)}`}return l.nil}function Ve(){if(me.validateSchema){const qe=J.scopeValue("validate$data",{ref:me.validateSchema});return(0,l._)`!${qe}(${se})`}return l.nil}}subschema(J,se){const fe=(0,o.getSubschema)(this.it,J);(0,o.extendSubschemaData)(fe,this.it,J),(0,o.extendSubschemaMode)(fe,J);const me={...this.it,...fe,items:void 0,props:void 0};return x(me,se),me}mergeEvaluated(J,se){const{it:fe,gen:me}=this;fe.opts.unevaluated&&(fe.props!==!0&&J.props!==void 0&&(fe.props=d.mergeEvaluated.props(me,J.props,fe.props,se)),fe.items!==!0&&J.items!==void 0&&(fe.items=d.mergeEvaluated.items(me,J.items,fe.items,se)))}mergeValidEvaluated(J,se){const{it:fe,gen:me}=this;if(fe.opts.unevaluated&&(fe.props!==!0||fe.items!==!0))return me.if(se,()=>this.mergeEvaluated(J,l.Name)),!0}}ki.KeywordCxt=Y;function ne(W,J,se,fe){const me=new Y(W,se,J);"code"in se?se.code(me,fe):me.$data&&se.validate?(0,a.funcKeywordCode)(me,se):"macro"in se?(0,a.macroKeywordCode)(me,se):(se.compile||se.validate)&&(0,a.funcKeywordCode)(me,se)}const ae=/^\/(?:[^~]|~0|~1)*$/,re=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function le(W,{dataLevel:J,dataNames:se,dataPathArr:fe}){let me,xe;if(W==="")return c.default.rootData;if(W[0]==="/"){if(!ae.test(W))throw new Error(`Invalid JSON-pointer: ${W}`);me=W,xe=c.default.rootData}else{const We=re.exec(W);if(!We)throw new Error(`Invalid JSON-pointer: ${W}`);const He=+We[1];if(me=We[2],me==="#"){if(He>=J)throw new Error(qe("property/index",He));return fe[J-He]}if(He>J)throw new Error(qe("data",He));if(xe=se[J-He],!me)return xe}let we=xe;const Ve=me.split("/");for(const We of Ve)We&&(xe=(0,l._)`${xe}${(0,l.getProperty)((0,d.unescapeJsonPointer)(We))}`,we=(0,l._)`${we} && ${xe}`);return we;function qe(We,He){return`Cannot access ${We} ${He} levels up, current level is ${J}`}}return ki.getData=le,ki}var Pd={},KD;function zE(){if(KD)return Pd;KD=1,Object.defineProperty(Pd,"__esModule",{value:!0});class e extends Error{constructor(n){super("validation failed"),this.errors=n,this.ajv=this.validation=!0}}return Pd.default=e,Pd}var Ld={},XD;function ym(){if(XD)return Ld;XD=1,Object.defineProperty(Ld,"__esModule",{value:!0});const e=mm();class t extends Error{constructor(r,i,a,o){super(o||`can't resolve reference ${a} from id ${i}`),this.missingRef=(0,e.resolveUrl)(r,i,a),this.missingSchema=(0,e.normalizeId)((0,e.getFullPath)(r,this.missingRef))}}return Ld.default=t,Ld}var Wn={},WD;function qE(){if(WD)return Wn;WD=1,Object.defineProperty(Wn,"__esModule",{value:!0}),Wn.resolveSchema=Wn.getCompilingSchema=Wn.resolveRef=Wn.compileSchema=Wn.SchemaEnv=void 0;const e=Xe(),t=zE(),n=La(),r=mm(),i=ht(),a=gm();class o{constructor(_){var S;this.refs={},this.dynamicAnchors={};let x;typeof _.schema=="object"&&(x=_.schema),this.schema=_.schema,this.schemaId=_.schemaId,this.root=_.root||this,this.baseId=(S=_.baseId)!==null&&S!==void 0?S:(0,r.normalizeId)(x==null?void 0:x[_.schemaId||"$id"]),this.schemaPath=_.schemaPath,this.localRefs=_.localRefs,this.meta=_.meta,this.$async=x==null?void 0:x.$async,this.refs={}}}Wn.SchemaEnv=o;function l(b){const _=d.call(this,b);if(_)return _;const S=(0,r.getFullPath)(this.opts.uriResolver,b.root.baseId),{es5:x,lines:A}=this.opts.code,{ownProperties:k}=this.opts,T=new e.CodeGen(this.scope,{es5:x,lines:A,ownProperties:k});let O;b.$async&&(O=T.scopeValue("Error",{ref:t.default,code:(0,e._)`require("ajv/dist/runtime/validation_error").default`}));const $=T.scopeName("validate");b.validateName=$;const L={gen:T,allErrors:this.opts.allErrors,data:n.default.data,parentData:n.default.parentData,parentDataProperty:n.default.parentDataProperty,dataNames:[n.default.data],dataPathArr:[e.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:T.scopeValue("schema",this.opts.code.source===!0?{ref:b.schema,code:(0,e.stringify)(b.schema)}:{ref:b.schema}),validateName:$,ValidationError:O,schema:b.schema,schemaEnv:b,rootId:S,baseId:b.baseId||S,schemaPath:e.nil,errSchemaPath:b.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,e._)`""`,opts:this.opts,self:this};let M;try{this._compilations.add(b),(0,a.validateFunctionCode)(L),T.optimize(this.opts.code.optimize);const z=T.toString();M=`${T.scopeRefs(n.default.scope)}return ${z}`,this.opts.code.process&&(M=this.opts.code.process(M,b));const q=new Function(`${n.default.self}`,`${n.default.scope}`,M)(this,this.scope.get());if(this.scope.value($,{ref:q}),q.errors=null,q.schema=b.schema,q.schemaEnv=b,b.$async&&(q.$async=!0),this.opts.code.source===!0&&(q.source={validateName:$,validateCode:z,scopeValues:T._values}),this.opts.unevaluated){const{props:D,items:H}=L;q.evaluated={props:D instanceof e.Name?void 0:D,items:H instanceof e.Name?void 0:H,dynamicProps:D instanceof e.Name,dynamicItems:H instanceof e.Name},q.source&&(q.source.evaluated=(0,e.stringify)(q.evaluated))}return b.validate=q,b}catch(z){throw delete b.validate,delete b.validateName,M&&this.logger.error("Error compiling schema, function code:",M),z}finally{this._compilations.delete(b)}}Wn.compileSchema=l;function c(b,_,S){var x;S=(0,r.resolveUrl)(this.opts.uriResolver,_,S);const A=b.refs[S];if(A)return A;let k=m.call(this,b,S);if(k===void 0){const T=(x=b.localRefs)===null||x===void 0?void 0:x[S],{schemaId:O}=this.opts;T&&(k=new o({schema:T,schemaId:O,root:b,baseId:_}))}if(k!==void 0)return b.refs[S]=f.call(this,k)}Wn.resolveRef=c;function f(b){return(0,r.inlineRef)(b.schema,this.opts.inlineRefs)?b.schema:b.validate?b:l.call(this,b)}function d(b){for(const _ of this._compilations)if(h(_,b))return _}Wn.getCompilingSchema=d;function h(b,_){return b.schema===_.schema&&b.root===_.root&&b.baseId===_.baseId}function m(b,_){let S;for(;typeof(S=this.refs[_])=="string";)_=S;return S||this.schemas[_]||g.call(this,b,_)}function g(b,_){const S=this.opts.uriResolver.parse(_),x=(0,r._getFullPath)(this.opts.uriResolver,S);let A=(0,r.getFullPath)(this.opts.uriResolver,b.baseId,void 0);if(Object.keys(b.schema).length>0&&x===A)return w.call(this,S,b);const k=(0,r.normalizeId)(x),T=this.refs[k]||this.schemas[k];if(typeof T=="string"){const O=g.call(this,b,T);return typeof(O==null?void 0:O.schema)!="object"?void 0:w.call(this,S,O)}if(typeof(T==null?void 0:T.schema)=="object"){if(T.validate||l.call(this,T),k===(0,r.normalizeId)(_)){const{schema:O}=T,{schemaId:$}=this.opts,L=O[$];return L&&(A=(0,r.resolveUrl)(this.opts.uriResolver,A,L)),new o({schema:O,schemaId:$,root:b,baseId:A})}return w.call(this,S,T)}}Wn.resolveSchema=g;const v=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function w(b,{baseId:_,schema:S,root:x}){var A;if(((A=b.fragment)===null||A===void 0?void 0:A[0])!=="/")return;for(const O of b.fragment.slice(1).split("/")){if(typeof S=="boolean")return;const $=S[(0,i.unescapeFragment)(O)];if($===void 0)return;S=$;const L=typeof S=="object"&&S[this.opts.schemaId];!v.has(O)&&L&&(_=(0,r.resolveUrl)(this.opts.uriResolver,_,L))}let k;if(typeof S!="boolean"&&S.$ref&&!(0,i.schemaHasRulesButRef)(S,this.RULES)){const O=(0,r.resolveUrl)(this.opts.uriResolver,_,S.$ref);k=g.call(this,x,O)}const{schemaId:T}=this.opts;if(k=k||new o({schema:S,schemaId:T,root:x,baseId:_}),k.schema!==k.root.schema)return k}return Wn}const xge="https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",wge="Meta-schema for $data reference (JSON AnySchema extension proposal)",Sge="object",Ege=["$data"],kge={$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},Age=!1,Tge={$id:xge,description:wge,type:Sge,required:Ege,properties:kge,additionalProperties:Age};var zd={},$u={exports:{}},Gx,QD;function XL(){if(QD)return Gx;QD=1;const e=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),t=RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u);function n(m){let g="",v=0,w=0;for(w=0;w<m.length;w++)if(v=m[w].charCodeAt(0),v!==48){if(!(v>=48&&v<=57||v>=65&&v<=70||v>=97&&v<=102))return"";g+=m[w];break}for(w+=1;w<m.length;w++){if(v=m[w].charCodeAt(0),!(v>=48&&v<=57||v>=65&&v<=70||v>=97&&v<=102))return"";g+=m[w]}return g}const r=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function i(m){return m.length=0,!0}function a(m,g,v){if(m.length){const w=n(m);if(w!=="")g.push(w);else return v.error=!0,!1;m.length=0}return!0}function o(m){let g=0;const v={error:!1,address:"",zone:""},w=[],b=[];let _=!1,S=!1,x=a;for(let A=0;A<m.length;A++){const k=m[A];if(!(k==="["||k==="]"))if(k===":"){if(_===!0&&(S=!0),!x(b,w,v))break;if(++g>7){v.error=!0;break}A>0&&m[A-1]===":"&&(_=!0),w.push(":");continue}else if(k==="%"){if(!x(b,w,v))break;x=i}else{b.push(k);continue}}return b.length&&(x===i?v.zone=b.join(""):S?w.push(b.join("")):w.push(n(b))),v.address=w.join(""),v}function l(m){if(c(m,":")<2)return{host:m,isIPV6:!1};const g=o(m);if(g.error)return{host:m,isIPV6:!1};{let v=g.address,w=g.address;return g.zone&&(v+="%"+g.zone,w+="%25"+g.zone),{host:v,isIPV6:!0,escapedHost:w}}}function c(m,g){let v=0;for(let w=0;w<m.length;w++)m[w]===g&&v++;return v}function f(m){let g=m;const v=[];let w=-1,b=0;for(;b=g.length;){if(b===1){if(g===".")break;if(g==="/"){v.push("/");break}else{v.push(g);break}}else if(b===2){if(g[0]==="."){if(g[1]===".")break;if(g[1]==="/"){g=g.slice(2);continue}}else if(g[0]==="/"&&(g[1]==="."||g[1]==="/")){v.push("/");break}}else if(b===3&&g==="/.."){v.length!==0&&v.pop(),v.push("/");break}if(g[0]==="."){if(g[1]==="."){if(g[2]==="/"){g=g.slice(3);continue}}else if(g[1]==="/"){g=g.slice(2);continue}}else if(g[0]==="/"&&g[1]==="."){if(g[2]==="/"){g=g.slice(2);continue}else if(g[2]==="."&&g[3]==="/"){g=g.slice(3),v.length!==0&&v.pop();continue}}if((w=g.indexOf("/",1))===-1){v.push(g);break}else v.push(g.slice(0,w)),g=g.slice(w)}return v.join("")}function d(m,g){const v=g!==!0?escape:unescape;return m.scheme!==void 0&&(m.scheme=v(m.scheme)),m.userinfo!==void 0&&(m.userinfo=v(m.userinfo)),m.host!==void 0&&(m.host=v(m.host)),m.path!==void 0&&(m.path=v(m.path)),m.query!==void 0&&(m.query=v(m.query)),m.fragment!==void 0&&(m.fragment=v(m.fragment)),m}function h(m){const g=[];if(m.userinfo!==void 0&&(g.push(m.userinfo),g.push("@")),m.host!==void 0){let v=unescape(m.host);if(!t(v)){const w=l(v);w.isIPV6===!0?v=`[${w.escapedHost}]`:v=m.host}g.push(v)}return(typeof m.port=="number"||typeof m.port=="string")&&(g.push(":"),g.push(String(m.port))),g.length?g.join(""):void 0}return Gx={nonSimpleDomain:r,recomposeAuthority:h,normalizeComponentEncoding:d,removeDotSegments:f,isIPv4:t,isUUID:e,normalizeIPv6:l,stringArrayToHexStripped:n},Gx}var Yx,JD;function Cge(){if(JD)return Yx;JD=1;const{isUUID:e}=XL(),t=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,n=["http","https","ws","wss","urn","urn:uuid"];function r(k){return n.indexOf(k)!==-1}function i(k){return k.secure===!0?!0:k.secure===!1?!1:k.scheme?k.scheme.length===3&&(k.scheme[0]==="w"||k.scheme[0]==="W")&&(k.scheme[1]==="s"||k.scheme[1]==="S")&&(k.scheme[2]==="s"||k.scheme[2]==="S"):!1}function a(k){return k.host||(k.error=k.error||"HTTP URIs must have a host."),k}function o(k){const T=String(k.scheme).toLowerCase()==="https";return(k.port===(T?443:80)||k.port==="")&&(k.port=void 0),k.path||(k.path="/"),k}function l(k){return k.secure=i(k),k.resourceName=(k.path||"/")+(k.query?"?"+k.query:""),k.path=void 0,k.query=void 0,k}function c(k){if((k.port===(i(k)?443:80)||k.port==="")&&(k.port=void 0),typeof k.secure=="boolean"&&(k.scheme=k.secure?"wss":"ws",k.secure=void 0),k.resourceName){const[T,O]=k.resourceName.split("?");k.path=T&&T!=="/"?T:void 0,k.query=O,k.resourceName=void 0}return k.fragment=void 0,k}function f(k,T){if(!k.path)return k.error="URN can not be parsed",k;const O=k.path.match(t);if(O){const $=T.scheme||k.scheme||"urn";k.nid=O[1].toLowerCase(),k.nss=O[2];const L=`${$}:${T.nid||k.nid}`,M=A(L);k.path=void 0,M&&(k=M.parse(k,T))}else k.error=k.error||"URN can not be parsed.";return k}function d(k,T){if(k.nid===void 0)throw new Error("URN without nid cannot be serialized");const O=T.scheme||k.scheme||"urn",$=k.nid.toLowerCase(),L=`${O}:${T.nid||$}`,M=A(L);M&&(k=M.serialize(k,T));const z=k,P=k.nss;return z.path=`${$||T.nid}:${P}`,T.skipEscape=!0,z}function h(k,T){const O=k;return O.uuid=O.nss,O.nss=void 0,!T.tolerant&&(!O.uuid||!e(O.uuid))&&(O.error=O.error||"UUID is not valid."),O}function m(k){const T=k;return T.nss=(k.uuid||"").toLowerCase(),T}const g={scheme:"http",domainHost:!0,parse:a,serialize:o},v={scheme:"https",domainHost:g.domainHost,parse:a,serialize:o},w={scheme:"ws",domainHost:!0,parse:l,serialize:c},b={scheme:"wss",domainHost:w.domainHost,parse:w.parse,serialize:w.serialize},x={http:g,https:v,ws:w,wss:b,urn:{scheme:"urn",parse:f,serialize:d,skipNormalize:!0},"urn:uuid":{scheme:"urn:uuid",parse:h,serialize:m,skipNormalize:!0}};Object.setPrototypeOf(x,null);function A(k){return k&&(x[k]||x[k.toLowerCase()])||void 0}return Yx={wsIsSecure:i,SCHEMES:x,isValidSchemeName:r,getSchemeHandler:A},Yx}var eI;function Oge(){if(eI)return $u.exports;eI=1;const{normalizeIPv6:e,removeDotSegments:t,recomposeAuthority:n,normalizeComponentEncoding:r,isIPv4:i,nonSimpleDomain:a}=XL(),{SCHEMES:o,getSchemeHandler:l}=Cge();function c(b,_){return typeof b=="string"?b=m(v(b,_),_):typeof b=="object"&&(b=v(m(b,_),_)),b}function f(b,_,S){const x=S?Object.assign({scheme:"null"},S):{scheme:"null"},A=d(v(b,x),v(_,x),x,!0);return x.skipEscape=!0,m(A,x)}function d(b,_,S,x){const A={};return x||(b=v(m(b,S),S),_=v(m(_,S),S)),S=S||{},!S.tolerant&&_.scheme?(A.scheme=_.scheme,A.userinfo=_.userinfo,A.host=_.host,A.port=_.port,A.path=t(_.path||""),A.query=_.query):(_.userinfo!==void 0||_.host!==void 0||_.port!==void 0?(A.userinfo=_.userinfo,A.host=_.host,A.port=_.port,A.path=t(_.path||""),A.query=_.query):(_.path?(_.path[0]==="/"?A.path=t(_.path):((b.userinfo!==void 0||b.host!==void 0||b.port!==void 0)&&!b.path?A.path="/"+_.path:b.path?A.path=b.path.slice(0,b.path.lastIndexOf("/")+1)+_.path:A.path=_.path,A.path=t(A.path)),A.query=_.query):(A.path=b.path,_.query!==void 0?A.query=_.query:A.query=b.query),A.userinfo=b.userinfo,A.host=b.host,A.port=b.port),A.scheme=b.scheme),A.fragment=_.fragment,A}function h(b,_,S){return typeof b=="string"?(b=unescape(b),b=m(r(v(b,S),!0),{...S,skipEscape:!0})):typeof b=="object"&&(b=m(r(b,!0),{...S,skipEscape:!0})),typeof _=="string"?(_=unescape(_),_=m(r(v(_,S),!0),{...S,skipEscape:!0})):typeof _=="object"&&(_=m(r(_,!0),{...S,skipEscape:!0})),b.toLowerCase()===_.toLowerCase()}function m(b,_){const S={host:b.host,scheme:b.scheme,userinfo:b.userinfo,port:b.port,path:b.path,query:b.query,nid:b.nid,nss:b.nss,uuid:b.uuid,fragment:b.fragment,reference:b.reference,resourceName:b.resourceName,secure:b.secure,error:""},x=Object.assign({},_),A=[],k=l(x.scheme||S.scheme);k&&k.serialize&&k.serialize(S,x),S.path!==void 0&&(x.skipEscape?S.path=unescape(S.path):(S.path=escape(S.path),S.scheme!==void 0&&(S.path=S.path.split("%3A").join(":")))),x.reference!=="suffix"&&S.scheme&&A.push(S.scheme,":");const T=n(S);if(T!==void 0&&(x.reference!=="suffix"&&A.push("//"),A.push(T),S.path&&S.path[0]!=="/"&&A.push("/")),S.path!==void 0){let O=S.path;!x.absolutePath&&(!k||!k.absolutePath)&&(O=t(O)),T===void 0&&O[0]==="/"&&O[1]==="/"&&(O="/%2F"+O.slice(2)),A.push(O)}return S.query!==void 0&&A.push("?",S.query),S.fragment!==void 0&&A.push("#",S.fragment),A.join("")}const g=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function v(b,_){const S=Object.assign({},_),x={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0};let A=!1;S.reference==="suffix"&&(S.scheme?b=S.scheme+":"+b:b="//"+b);const k=b.match(g);if(k){if(x.scheme=k[1],x.userinfo=k[3],x.host=k[4],x.port=parseInt(k[5],10),x.path=k[6]||"",x.query=k[7],x.fragment=k[8],isNaN(x.port)&&(x.port=k[5]),x.host)if(i(x.host)===!1){const $=e(x.host);x.host=$.host.toLowerCase(),A=$.isIPV6}else A=!0;x.scheme===void 0&&x.userinfo===void 0&&x.host===void 0&&x.port===void 0&&x.query===void 0&&!x.path?x.reference="same-document":x.scheme===void 0?x.reference="relative":x.fragment===void 0?x.reference="absolute":x.reference="uri",S.reference&&S.reference!=="suffix"&&S.reference!==x.reference&&(x.error=x.error||"URI is not a "+S.reference+" reference.");const T=l(S.scheme||x.scheme);if(!S.unicodeSupport&&(!T||!T.unicodeSupport)&&x.host&&(S.domainHost||T&&T.domainHost)&&A===!1&&a(x.host))try{x.host=URL.domainToASCII(x.host.toLowerCase())}catch(O){x.error=x.error||"Host's domain name can not be converted to ASCII: "+O}(!T||T&&!T.skipNormalize)&&(b.indexOf("%")!==-1&&(x.scheme!==void 0&&(x.scheme=unescape(x.scheme)),x.host!==void 0&&(x.host=unescape(x.host))),x.path&&(x.path=escape(unescape(x.path))),x.fragment&&(x.fragment=encodeURI(decodeURIComponent(x.fragment)))),T&&T.parse&&T.parse(x,S)}else x.error=x.error||"URI can not be parsed.";return x}const w={SCHEMES:o,normalize:c,resolve:f,resolveComponent:d,equal:h,serialize:m,parse:v};return $u.exports=w,$u.exports.default=w,$u.exports.fastUri=w,$u.exports}var tI;function Nge(){if(tI)return zd;tI=1,Object.defineProperty(zd,"__esModule",{value:!0});const e=Oge();return e.code='require("ajv/dist/runtime/uri").default',zd.default=e,zd}var nI;function Rge(){return nI||(nI=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=void 0;var t=gm();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return t.KeywordCxt}});var n=Xe();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return n._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return n.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return n.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return n.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return n.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return n.CodeGen}});const r=zE(),i=ym(),a=YL(),o=qE(),l=Xe(),c=mm(),f=yp(),d=ht(),h=Tge,m=Nge(),g=(R,V)=>new RegExp(R,V);g.code="new RegExp";const v=["removeAdditional","useDefaults","coerceTypes"],w=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),b={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},_={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},S=200;function x(R){var V,X,j,I,U,Y,ne,ae,re,le,W,J,se,fe,me,xe,we,Ve,qe,We,He,$e,Be,Ot,kt;const pe=R.strict,_e=(V=R.code)===null||V===void 0?void 0:V.optimize,Te=_e===!0||_e===void 0?1:_e||0,je=(j=(X=R.code)===null||X===void 0?void 0:X.regExp)!==null&&j!==void 0?j:g,rt=(I=R.uriResolver)!==null&&I!==void 0?I:m.default;return{strictSchema:(Y=(U=R.strictSchema)!==null&&U!==void 0?U:pe)!==null&&Y!==void 0?Y:!0,strictNumbers:(ae=(ne=R.strictNumbers)!==null&&ne!==void 0?ne:pe)!==null&&ae!==void 0?ae:!0,strictTypes:(le=(re=R.strictTypes)!==null&&re!==void 0?re:pe)!==null&&le!==void 0?le:"log",strictTuples:(J=(W=R.strictTuples)!==null&&W!==void 0?W:pe)!==null&&J!==void 0?J:"log",strictRequired:(fe=(se=R.strictRequired)!==null&&se!==void 0?se:pe)!==null&&fe!==void 0?fe:!1,code:R.code?{...R.code,optimize:Te,regExp:je}:{optimize:Te,regExp:je},loopRequired:(me=R.loopRequired)!==null&&me!==void 0?me:S,loopEnum:(xe=R.loopEnum)!==null&&xe!==void 0?xe:S,meta:(we=R.meta)!==null&&we!==void 0?we:!0,messages:(Ve=R.messages)!==null&&Ve!==void 0?Ve:!0,inlineRefs:(qe=R.inlineRefs)!==null&&qe!==void 0?qe:!0,schemaId:(We=R.schemaId)!==null&&We!==void 0?We:"$id",addUsedSchema:(He=R.addUsedSchema)!==null&&He!==void 0?He:!0,validateSchema:($e=R.validateSchema)!==null&&$e!==void 0?$e:!0,validateFormats:(Be=R.validateFormats)!==null&&Be!==void 0?Be:!0,unicodeRegExp:(Ot=R.unicodeRegExp)!==null&&Ot!==void 0?Ot:!0,int32range:(kt=R.int32range)!==null&&kt!==void 0?kt:!0,uriResolver:rt}}class A{constructor(V={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,V=this.opts={...V,...x(V)};const{es5:X,lines:j}=this.opts.code;this.scope=new l.ValueScope({scope:{},prefixes:w,es5:X,lines:j}),this.logger=P(V.logger);const I=V.validateFormats;V.validateFormats=!1,this.RULES=(0,a.getRules)(),k.call(this,b,V,"NOT SUPPORTED"),k.call(this,_,V,"DEPRECATED","warn"),this._metaOpts=M.call(this),V.formats&&$.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),V.keywords&&L.call(this,V.keywords),typeof V.meta=="object"&&this.addMetaSchema(V.meta),O.call(this),V.validateFormats=I}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:V,meta:X,schemaId:j}=this.opts;let I=h;j==="id"&&(I={...h},I.id=I.$id,delete I.$id),X&&V&&this.addMetaSchema(I,I[j],!1)}defaultMeta(){const{meta:V,schemaId:X}=this.opts;return this.opts.defaultMeta=typeof V=="object"?V[X]||V:void 0}validate(V,X){let j;if(typeof V=="string"){if(j=this.getSchema(V),!j)throw new Error(`no schema with key or ref "${V}"`)}else j=this.compile(V);const I=j(X);return"$async"in j||(this.errors=j.errors),I}compile(V,X){const j=this._addSchema(V,X);return j.validate||this._compileSchemaEnv(j)}compileAsync(V,X){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");const{loadSchema:j}=this.opts;return I.call(this,V,X);async function I(le,W){await U.call(this,le.$schema);const J=this._addSchema(le,W);return J.validate||Y.call(this,J)}async function U(le){le&&!this.getSchema(le)&&await I.call(this,{$ref:le},!0)}async function Y(le){try{return this._compileSchemaEnv(le)}catch(W){if(!(W instanceof i.default))throw W;return ne.call(this,W),await ae.call(this,W.missingSchema),Y.call(this,le)}}function ne({missingSchema:le,missingRef:W}){if(this.refs[le])throw new Error(`AnySchema ${le} is loaded but ${W} cannot be resolved`)}async function ae(le){const W=await re.call(this,le);this.refs[le]||await U.call(this,W.$schema),this.refs[le]||this.addSchema(W,le,X)}async function re(le){const W=this._loading[le];if(W)return W;try{return await(this._loading[le]=j(le))}finally{delete this._loading[le]}}}addSchema(V,X,j,I=this.opts.validateSchema){if(Array.isArray(V)){for(const Y of V)this.addSchema(Y,void 0,j,I);return this}let U;if(typeof V=="object"){const{schemaId:Y}=this.opts;if(U=V[Y],U!==void 0&&typeof U!="string")throw new Error(`schema ${Y} must be string`)}return X=(0,c.normalizeId)(X||U),this._checkUnique(X),this.schemas[X]=this._addSchema(V,j,X,I,!0),this}addMetaSchema(V,X,j=this.opts.validateSchema){return this.addSchema(V,X,!0,j),this}validateSchema(V,X){if(typeof V=="boolean")return!0;let j;if(j=V.$schema,j!==void 0&&typeof j!="string")throw new Error("$schema must be a string");if(j=j||this.opts.defaultMeta||this.defaultMeta(),!j)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const I=this.validate(j,V);if(!I&&X){const U="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(U);else throw new Error(U)}return I}getSchema(V){let X;for(;typeof(X=T.call(this,V))=="string";)V=X;if(X===void 0){const{schemaId:j}=this.opts,I=new o.SchemaEnv({schema:{},schemaId:j});if(X=o.resolveSchema.call(this,I,V),!X)return;this.refs[V]=X}return X.validate||this._compileSchemaEnv(X)}removeSchema(V){if(V instanceof RegExp)return this._removeAllSchemas(this.schemas,V),this._removeAllSchemas(this.refs,V),this;switch(typeof V){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const X=T.call(this,V);return typeof X=="object"&&this._cache.delete(X.schema),delete this.schemas[V],delete this.refs[V],this}case"object":{const X=V;this._cache.delete(X);let j=V[this.opts.schemaId];return j&&(j=(0,c.normalizeId)(j),delete this.schemas[j],delete this.refs[j]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(V){for(const X of V)this.addKeyword(X);return this}addKeyword(V,X){let j;if(typeof V=="string")j=V,typeof X=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),X.keyword=j);else if(typeof V=="object"&&X===void 0){if(X=V,j=X.keyword,Array.isArray(j)&&!j.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(D.call(this,j,X),!X)return(0,d.eachItem)(j,U=>H.call(this,U)),this;G.call(this,X);const I={...X,type:(0,f.getJSONTypes)(X.type),schemaType:(0,f.getJSONTypes)(X.schemaType)};return(0,d.eachItem)(j,I.type.length===0?U=>H.call(this,U,I):U=>I.type.forEach(Y=>H.call(this,U,I,Y))),this}getKeyword(V){const X=this.RULES.all[V];return typeof X=="object"?X.definition:!!X}removeKeyword(V){const{RULES:X}=this;delete X.keywords[V],delete X.all[V];for(const j of X.rules){const I=j.rules.findIndex(U=>U.keyword===V);I>=0&&j.rules.splice(I,1)}return this}addFormat(V,X){return typeof X=="string"&&(X=new RegExp(X)),this.formats[V]=X,this}errorsText(V=this.errors,{separator:X=", ",dataVar:j="data"}={}){return!V||V.length===0?"No errors":V.map(I=>`${j}${I.instancePath} ${I.message}`).reduce((I,U)=>I+X+U)}$dataMetaSchema(V,X){const j=this.RULES.all;V=JSON.parse(JSON.stringify(V));for(const I of X){const U=I.split("/").slice(1);let Y=V;for(const ne of U)Y=Y[ne];for(const ne in j){const ae=j[ne];if(typeof ae!="object")continue;const{$data:re}=ae.definition,le=Y[ne];re&&le&&(Y[ne]=Q(le))}}return V}_removeAllSchemas(V,X){for(const j in V){const I=V[j];(!X||X.test(j))&&(typeof I=="string"?delete V[j]:I&&!I.meta&&(this._cache.delete(I.schema),delete V[j]))}}_addSchema(V,X,j,I=this.opts.validateSchema,U=this.opts.addUsedSchema){let Y;const{schemaId:ne}=this.opts;if(typeof V=="object")Y=V[ne];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof V!="boolean")throw new Error("schema must be object or boolean")}let ae=this._cache.get(V);if(ae!==void 0)return ae;j=(0,c.normalizeId)(Y||j);const re=c.getSchemaRefs.call(this,V,j);return ae=new o.SchemaEnv({schema:V,schemaId:ne,meta:X,baseId:j,localRefs:re}),this._cache.set(ae.schema,ae),U&&!j.startsWith("#")&&(j&&this._checkUnique(j),this.refs[j]=ae),I&&this.validateSchema(V,!0),ae}_checkUnique(V){if(this.schemas[V]||this.refs[V])throw new Error(`schema with key or id "${V}" already exists`)}_compileSchemaEnv(V){if(V.meta?this._compileMetaSchema(V):o.compileSchema.call(this,V),!V.validate)throw new Error("ajv implementation error");return V.validate}_compileMetaSchema(V){const X=this.opts;this.opts=this._metaOpts;try{o.compileSchema.call(this,V)}finally{this.opts=X}}}A.ValidationError=r.default,A.MissingRefError=i.default,e.default=A;function k(R,V,X,j="error"){for(const I in R){const U=I;U in V&&this.logger[j](`${X}: option ${I}. ${R[U]}`)}}function T(R){return R=(0,c.normalizeId)(R),this.schemas[R]||this.refs[R]}function O(){const R=this.opts.schemas;if(R)if(Array.isArray(R))this.addSchema(R);else for(const V in R)this.addSchema(R[V],V)}function $(){for(const R in this.opts.formats){const V=this.opts.formats[R];V&&this.addFormat(R,V)}}function L(R){if(Array.isArray(R)){this.addVocabulary(R);return}this.logger.warn("keywords option as map is deprecated, pass array");for(const V in R){const X=R[V];X.keyword||(X.keyword=V),this.addKeyword(X)}}function M(){const R={...this.opts};for(const V of v)delete R[V];return R}const z={log(){},warn(){},error(){}};function P(R){if(R===!1)return z;if(R===void 0)return console;if(R.log&&R.warn&&R.error)return R;throw new Error("logger must implement log, warn and error methods")}const q=/^[a-z_$][a-z0-9_$:-]*$/i;function D(R,V){const{RULES:X}=this;if((0,d.eachItem)(R,j=>{if(X.keywords[j])throw new Error(`Keyword ${j} is already defined`);if(!q.test(j))throw new Error(`Keyword ${j} has invalid name`)}),!!V&&V.$data&&!("code"in V||"validate"in V))throw new Error('$data keyword must have "code" or "validate" function')}function H(R,V,X){var j;const I=V==null?void 0:V.post;if(X&&I)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:U}=this;let Y=I?U.post:U.rules.find(({type:ae})=>ae===X);if(Y||(Y={type:X,rules:[]},U.rules.push(Y)),U.keywords[R]=!0,!V)return;const ne={keyword:R,definition:{...V,type:(0,f.getJSONTypes)(V.type),schemaType:(0,f.getJSONTypes)(V.schemaType)}};V.before?B.call(this,Y,ne,V.before):Y.rules.push(ne),U.all[R]=ne,(j=V.implements)===null||j===void 0||j.forEach(ae=>this.addKeyword(ae))}function B(R,V,X){const j=R.rules.findIndex(I=>I.keyword===X);j>=0?R.rules.splice(j,0,V):(R.rules.push(V),this.logger.warn(`rule ${X} is not defined`))}function G(R){let{metaSchema:V}=R;V!==void 0&&(R.$data&&this.opts.$data&&(V=Q(V)),R.validateSchema=this.compile(V,!0))}const K={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function Q(R){return{anyOf:[R,K]}}}(zx)),zx}var qd={},Fd={},Bd={},rI;function jge(){if(rI)return Bd;rI=1,Object.defineProperty(Bd,"__esModule",{value:!0});const e={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};return Bd.default=e,Bd}var Ea={},iI;function Mge(){if(iI)return Ea;iI=1,Object.defineProperty(Ea,"__esModule",{value:!0}),Ea.callRef=Ea.getValidate=void 0;const e=ym(),t=Lr(),n=Xe(),r=La(),i=qE(),a=ht(),o={keyword:"$ref",schemaType:"string",code(f){const{gen:d,schema:h,it:m}=f,{baseId:g,schemaEnv:v,validateName:w,opts:b,self:_}=m,{root:S}=v;if((h==="#"||h==="#/")&&g===S.baseId)return A();const x=i.resolveRef.call(_,S,g,h);if(x===void 0)throw new e.default(m.opts.uriResolver,g,h);if(x instanceof i.SchemaEnv)return k(x);return T(x);function A(){if(v===S)return c(f,w,v,v.$async);const O=d.scopeValue("root",{ref:S});return c(f,(0,n._)`${O}.validate`,S,S.$async)}function k(O){const $=l(f,O);c(f,$,O,O.$async)}function T(O){const $=d.scopeValue("schema",b.code.source===!0?{ref:O,code:(0,n.stringify)(O)}:{ref:O}),L=d.name("valid"),M=f.subschema({schema:O,dataTypes:[],schemaPath:n.nil,topSchemaRef:$,errSchemaPath:h},L);f.mergeEvaluated(M),f.ok(L)}}};function l(f,d){const{gen:h}=f;return d.validate?h.scopeValue("validate",{ref:d.validate}):(0,n._)`${h.scopeValue("wrapper",{ref:d})}.validate`}Ea.getValidate=l;function c(f,d,h,m){const{gen:g,it:v}=f,{allErrors:w,schemaEnv:b,opts:_}=v,S=_.passContext?r.default.this:n.nil;m?x():A();function x(){if(!b.$async)throw new Error("async schema referenced by sync schema");const O=g.let("valid");g.try(()=>{g.code((0,n._)`await ${(0,t.callValidateCode)(f,d,S)}`),T(d),w||g.assign(O,!0)},$=>{g.if((0,n._)`!(${$} instanceof ${v.ValidationError})`,()=>g.throw($)),k($),w||g.assign(O,!1)}),f.ok(O)}function A(){f.result((0,t.callValidateCode)(f,d,S),()=>T(d),()=>k(d))}function k(O){const $=(0,n._)`${O}.errors`;g.assign(r.default.vErrors,(0,n._)`${r.default.vErrors} === null ? ${$} : ${r.default.vErrors}.concat(${$})`),g.assign(r.default.errors,(0,n._)`${r.default.vErrors}.length`)}function T(O){var $;if(!v.opts.unevaluated)return;const L=($=h==null?void 0:h.validate)===null||$===void 0?void 0:$.evaluated;if(v.props!==!0)if(L&&!L.dynamicProps)L.props!==void 0&&(v.props=a.mergeEvaluated.props(g,L.props,v.props));else{const M=g.var("props",(0,n._)`${O}.evaluated.props`);v.props=a.mergeEvaluated.props(g,M,v.props,n.Name)}if(v.items!==!0)if(L&&!L.dynamicItems)L.items!==void 0&&(v.items=a.mergeEvaluated.items(g,L.items,v.items));else{const M=g.var("items",(0,n._)`${O}.evaluated.items`);v.items=a.mergeEvaluated.items(g,M,v.items,n.Name)}}}return Ea.callRef=c,Ea.default=o,Ea}var aI;function $ge(){if(aI)return Fd;aI=1,Object.defineProperty(Fd,"__esModule",{value:!0});const e=jge(),t=Mge(),n=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",e.default,t.default];return Fd.default=n,Fd}var Ud={},Vd={},sI;function Dge(){if(sI)return Vd;sI=1,Object.defineProperty(Vd,"__esModule",{value:!0});const e=Xe(),t=e.operators,n={maximum:{okStr:"<=",ok:t.LTE,fail:t.GT},minimum:{okStr:">=",ok:t.GTE,fail:t.LT},exclusiveMaximum:{okStr:"<",ok:t.LT,fail:t.GTE},exclusiveMinimum:{okStr:">",ok:t.GT,fail:t.LTE}},r={message:({keyword:a,schemaCode:o})=>(0,e.str)`must be ${n[a].okStr} ${o}`,params:({keyword:a,schemaCode:o})=>(0,e._)`{comparison: ${n[a].okStr}, limit: ${o}}`},i={keyword:Object.keys(n),type:"number",schemaType:"number",$data:!0,error:r,code(a){const{keyword:o,data:l,schemaCode:c}=a;a.fail$data((0,e._)`${l} ${n[o].fail} ${c} || isNaN(${l})`)}};return Vd.default=i,Vd}var Hd={},oI;function Ige(){if(oI)return Hd;oI=1,Object.defineProperty(Hd,"__esModule",{value:!0});const e=Xe(),n={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:r})=>(0,e.str)`must be multiple of ${r}`,params:({schemaCode:r})=>(0,e._)`{multipleOf: ${r}}`},code(r){const{gen:i,data:a,schemaCode:o,it:l}=r,c=l.opts.multipleOfPrecision,f=i.let("res"),d=c?(0,e._)`Math.abs(Math.round(${f}) - ${f}) > 1e-${c}`:(0,e._)`${f} !== parseInt(${f})`;r.fail$data((0,e._)`(${o} === 0 || (${f} = ${a}/${o}, ${d}))`)}};return Hd.default=n,Hd}var Gd={},Yd={},lI;function Pge(){if(lI)return Yd;lI=1,Object.defineProperty(Yd,"__esModule",{value:!0});function e(t){const n=t.length;let r=0,i=0,a;for(;i<n;)r++,a=t.charCodeAt(i++),a>=55296&&a<=56319&&i<n&&(a=t.charCodeAt(i),(a&64512)===56320&&i++);return r}return Yd.default=e,e.code='require("ajv/dist/runtime/ucs2length").default',Yd}var uI;function Lge(){if(uI)return Gd;uI=1,Object.defineProperty(Gd,"__esModule",{value:!0});const e=Xe(),t=ht(),n=Pge(),i={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message({keyword:a,schemaCode:o}){const l=a==="maxLength"?"more":"fewer";return(0,e.str)`must NOT have ${l} than ${o} characters`},params:({schemaCode:a})=>(0,e._)`{limit: ${a}}`},code(a){const{keyword:o,data:l,schemaCode:c,it:f}=a,d=o==="maxLength"?e.operators.GT:e.operators.LT,h=f.opts.unicode===!1?(0,e._)`${l}.length`:(0,e._)`${(0,t.useFunc)(a.gen,n.default)}(${l})`;a.fail$data((0,e._)`${h} ${d} ${c}`)}};return Gd.default=i,Gd}var Zd={},cI;function zge(){if(cI)return Zd;cI=1,Object.defineProperty(Zd,"__esModule",{value:!0});const e=Lr(),t=Xe(),r={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:i})=>(0,t.str)`must match pattern "${i}"`,params:({schemaCode:i})=>(0,t._)`{pattern: ${i}}`},code(i){const{data:a,$data:o,schema:l,schemaCode:c,it:f}=i,d=f.opts.unicodeRegExp?"u":"",h=o?(0,t._)`(new RegExp(${c}, ${d}))`:(0,e.usePattern)(i,l);i.fail$data((0,t._)`!${h}.test(${a})`)}};return Zd.default=r,Zd}var Kd={},fI;function qge(){if(fI)return Kd;fI=1,Object.defineProperty(Kd,"__esModule",{value:!0});const e=Xe(),n={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message({keyword:r,schemaCode:i}){const a=r==="maxProperties"?"more":"fewer";return(0,e.str)`must NOT have ${a} than ${i} properties`},params:({schemaCode:r})=>(0,e._)`{limit: ${r}}`},code(r){const{keyword:i,data:a,schemaCode:o}=r,l=i==="maxProperties"?e.operators.GT:e.operators.LT;r.fail$data((0,e._)`Object.keys(${a}).length ${l} ${o}`)}};return Kd.default=n,Kd}var Xd={},dI;function Fge(){if(dI)return Xd;dI=1,Object.defineProperty(Xd,"__esModule",{value:!0});const e=Lr(),t=Xe(),n=ht(),i={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:a}})=>(0,t.str)`must have required property '${a}'`,params:({params:{missingProperty:a}})=>(0,t._)`{missingProperty: ${a}}`},code(a){const{gen:o,schema:l,schemaCode:c,data:f,$data:d,it:h}=a,{opts:m}=h;if(!d&&l.length===0)return;const g=l.length>=m.loopRequired;if(h.allErrors?v():w(),m.strictRequired){const S=a.parentSchema.properties,{definedProperties:x}=a.it;for(const A of l)if((S==null?void 0:S[A])===void 0&&!x.has(A)){const k=h.schemaEnv.baseId+h.errSchemaPath,T=`required property "${A}" is not defined at "${k}" (strictRequired)`;(0,n.checkStrictMode)(h,T,h.opts.strictRequired)}}function v(){if(g||d)a.block$data(t.nil,b);else for(const S of l)(0,e.checkReportMissingProp)(a,S)}function w(){const S=o.let("missing");if(g||d){const x=o.let("valid",!0);a.block$data(x,()=>_(S,x)),a.ok(x)}else o.if((0,e.checkMissingProp)(a,l,S)),(0,e.reportMissingProp)(a,S),o.else()}function b(){o.forOf("prop",c,S=>{a.setParams({missingProperty:S}),o.if((0,e.noPropertyInData)(o,f,S,m.ownProperties),()=>a.error())})}function _(S,x){a.setParams({missingProperty:S}),o.forOf(S,c,()=>{o.assign(x,(0,e.propertyInData)(o,f,S,m.ownProperties)),o.if((0,t.not)(x),()=>{a.error(),o.break()})},t.nil)}}};return Xd.default=i,Xd}var Wd={},hI;function Bge(){if(hI)return Wd;hI=1,Object.defineProperty(Wd,"__esModule",{value:!0});const e=Xe(),n={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message({keyword:r,schemaCode:i}){const a=r==="maxItems"?"more":"fewer";return(0,e.str)`must NOT have ${a} than ${i} items`},params:({schemaCode:r})=>(0,e._)`{limit: ${r}}`},code(r){const{keyword:i,data:a,schemaCode:o}=r,l=i==="maxItems"?e.operators.GT:e.operators.LT;r.fail$data((0,e._)`${a}.length ${l} ${o}`)}};return Wd.default=n,Wd}var Qd={},Jd={},pI;function FE(){if(pI)return Jd;pI=1,Object.defineProperty(Jd,"__esModule",{value:!0});const e=KL();return e.code='require("ajv/dist/runtime/equal").default',Jd.default=e,Jd}var mI;function Uge(){if(mI)return Qd;mI=1,Object.defineProperty(Qd,"__esModule",{value:!0});const e=yp(),t=Xe(),n=ht(),r=FE(),a={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:o,j:l}})=>(0,t.str)`must NOT have duplicate items (items ## ${l} and ${o} are identical)`,params:({params:{i:o,j:l}})=>(0,t._)`{i: ${o}, j: ${l}}`},code(o){const{gen:l,data:c,$data:f,schema:d,parentSchema:h,schemaCode:m,it:g}=o;if(!f&&!d)return;const v=l.let("valid"),w=h.items?(0,e.getSchemaTypes)(h.items):[];o.block$data(v,b,(0,t._)`${m} === false`),o.ok(v);function b(){const A=l.let("i",(0,t._)`${c}.length`),k=l.let("j");o.setParams({i:A,j:k}),l.assign(v,!0),l.if((0,t._)`${A} > 1`,()=>(_()?S:x)(A,k))}function _(){return w.length>0&&!w.some(A=>A==="object"||A==="array")}function S(A,k){const T=l.name("item"),O=(0,e.checkDataTypes)(w,T,g.opts.strictNumbers,e.DataType.Wrong),$=l.const("indices",(0,t._)`{}`);l.for((0,t._)`;${A}--;`,()=>{l.let(T,(0,t._)`${c}[${A}]`),l.if(O,(0,t._)`continue`),w.length>1&&l.if((0,t._)`typeof ${T} == "string"`,(0,t._)`${T} += "_"`),l.if((0,t._)`typeof ${$}[${T}] == "number"`,()=>{l.assign(k,(0,t._)`${$}[${T}]`),o.error(),l.assign(v,!1).break()}).code((0,t._)`${$}[${T}] = ${A}`)})}function x(A,k){const T=(0,n.useFunc)(l,r.default),O=l.name("outer");l.label(O).for((0,t._)`;${A}--;`,()=>l.for((0,t._)`${k} = ${A}; ${k}--;`,()=>l.if((0,t._)`${T}(${c}[${A}], ${c}[${k}])`,()=>{o.error(),l.assign(v,!1).break(O)})))}}};return Qd.default=a,Qd}var eh={},gI;function Vge(){if(gI)return eh;gI=1,Object.defineProperty(eh,"__esModule",{value:!0});const e=Xe(),t=ht(),n=FE(),i={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:a})=>(0,e._)`{allowedValue: ${a}}`},code(a){const{gen:o,data:l,$data:c,schemaCode:f,schema:d}=a;c||d&&typeof d=="object"?a.fail$data((0,e._)`!${(0,t.useFunc)(o,n.default)}(${l}, ${f})`):a.fail((0,e._)`${d} !== ${l}`)}};return eh.default=i,eh}var th={},yI;function Hge(){if(yI)return th;yI=1,Object.defineProperty(th,"__esModule",{value:!0});const e=Xe(),t=ht(),n=FE(),i={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:a})=>(0,e._)`{allowedValues: ${a}}`},code(a){const{gen:o,data:l,$data:c,schema:f,schemaCode:d,it:h}=a;if(!c&&f.length===0)throw new Error("enum must have non-empty array");const m=f.length>=h.opts.loopEnum;let g;const v=()=>g??(g=(0,t.useFunc)(o,n.default));let w;if(m||c)w=o.let("valid"),a.block$data(w,b);else{if(!Array.isArray(f))throw new Error("ajv implementation error");const S=o.const("vSchema",d);w=(0,e.or)(...f.map((x,A)=>_(S,A)))}a.pass(w);function b(){o.assign(w,!1),o.forOf("v",d,S=>o.if((0,e._)`${v()}(${l}, ${S})`,()=>o.assign(w,!0).break()))}function _(S,x){const A=f[x];return typeof A=="object"&&A!==null?(0,e._)`${v()}(${l}, ${S}[${x}])`:(0,e._)`${l} === ${A}`}}};return th.default=i,th}var bI;function Gge(){if(bI)return Ud;bI=1,Object.defineProperty(Ud,"__esModule",{value:!0});const e=Dge(),t=Ige(),n=Lge(),r=zge(),i=qge(),a=Fge(),o=Bge(),l=Uge(),c=Vge(),f=Hge(),d=[e.default,t.default,n.default,r.default,i.default,a.default,o.default,l.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},c.default,f.default];return Ud.default=d,Ud}var nh={},Oo={},vI;function WL(){if(vI)return Oo;vI=1,Object.defineProperty(Oo,"__esModule",{value:!0}),Oo.validateAdditionalItems=void 0;const e=Xe(),t=ht(),r={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:a}})=>(0,e.str)`must NOT have more than ${a} items`,params:({params:{len:a}})=>(0,e._)`{limit: ${a}}`},code(a){const{parentSchema:o,it:l}=a,{items:c}=o;if(!Array.isArray(c)){(0,t.checkStrictMode)(l,'"additionalItems" is ignored when "items" is not an array of schemas');return}i(a,c)}};function i(a,o){const{gen:l,schema:c,data:f,keyword:d,it:h}=a;h.items=!0;const m=l.const("len",(0,e._)`${f}.length`);if(c===!1)a.setParams({len:o.length}),a.pass((0,e._)`${m} <= ${o.length}`);else if(typeof c=="object"&&!(0,t.alwaysValidSchema)(h,c)){const v=l.var("valid",(0,e._)`${m} <= ${o.length}`);l.if((0,e.not)(v),()=>g(v)),a.ok(v)}function g(v){l.forRange("i",o.length,m,w=>{a.subschema({keyword:d,dataProp:w,dataPropType:t.Type.Num},v),h.allErrors||l.if((0,e.not)(v),()=>l.break())})}}return Oo.validateAdditionalItems=i,Oo.default=r,Oo}var rh={},No={},_I;function QL(){if(_I)return No;_I=1,Object.defineProperty(No,"__esModule",{value:!0}),No.validateTuple=void 0;const e=Xe(),t=ht(),n=Lr(),r={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(a){const{schema:o,it:l}=a;if(Array.isArray(o))return i(a,"additionalItems",o);l.items=!0,!(0,t.alwaysValidSchema)(l,o)&&a.ok((0,n.validateArray)(a))}};function i(a,o,l=a.schema){const{gen:c,parentSchema:f,data:d,keyword:h,it:m}=a;w(f),m.opts.unevaluated&&l.length&&m.items!==!0&&(m.items=t.mergeEvaluated.items(c,l.length,m.items));const g=c.name("valid"),v=c.const("len",(0,e._)`${d}.length`);l.forEach((b,_)=>{(0,t.alwaysValidSchema)(m,b)||(c.if((0,e._)`${v} > ${_}`,()=>a.subschema({keyword:h,schemaProp:_,dataProp:_},g)),a.ok(g))});function w(b){const{opts:_,errSchemaPath:S}=m,x=l.length,A=x===b.minItems&&(x===b.maxItems||b[o]===!1);if(_.strictTuples&&!A){const k=`"${h}" is ${x}-tuple, but minItems or maxItems/${o} are not specified or different at path "${S}"`;(0,t.checkStrictMode)(m,k,_.strictTuples)}}}return No.validateTuple=i,No.default=r,No}var xI;function Yge(){if(xI)return rh;xI=1,Object.defineProperty(rh,"__esModule",{value:!0});const e=QL(),t={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:n=>(0,e.validateTuple)(n,"items")};return rh.default=t,rh}var ih={},wI;function Zge(){if(wI)return ih;wI=1,Object.defineProperty(ih,"__esModule",{value:!0});const e=Xe(),t=ht(),n=Lr(),r=WL(),a={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:o}})=>(0,e.str)`must NOT have more than ${o} items`,params:({params:{len:o}})=>(0,e._)`{limit: ${o}}`},code(o){const{schema:l,parentSchema:c,it:f}=o,{prefixItems:d}=c;f.items=!0,!(0,t.alwaysValidSchema)(f,l)&&(d?(0,r.validateAdditionalItems)(o,d):o.ok((0,n.validateArray)(o)))}};return ih.default=a,ih}var ah={},SI;function Kge(){if(SI)return ah;SI=1,Object.defineProperty(ah,"__esModule",{value:!0});const e=Xe(),t=ht(),r={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:i,max:a}})=>a===void 0?(0,e.str)`must contain at least ${i} valid item(s)`:(0,e.str)`must contain at least ${i} and no more than ${a} valid item(s)`,params:({params:{min:i,max:a}})=>a===void 0?(0,e._)`{minContains: ${i}}`:(0,e._)`{minContains: ${i}, maxContains: ${a}}`},code(i){const{gen:a,schema:o,parentSchema:l,data:c,it:f}=i;let d,h;const{minContains:m,maxContains:g}=l;f.opts.next?(d=m===void 0?1:m,h=g):d=1;const v=a.const("len",(0,e._)`${c}.length`);if(i.setParams({min:d,max:h}),h===void 0&&d===0){(0,t.checkStrictMode)(f,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(h!==void 0&&d>h){(0,t.checkStrictMode)(f,'"minContains" > "maxContains" is always invalid'),i.fail();return}if((0,t.alwaysValidSchema)(f,o)){let x=(0,e._)`${v} >= ${d}`;h!==void 0&&(x=(0,e._)`${x} && ${v} <= ${h}`),i.pass(x);return}f.items=!0;const w=a.name("valid");h===void 0&&d===1?_(w,()=>a.if(w,()=>a.break())):d===0?(a.let(w,!0),h!==void 0&&a.if((0,e._)`${c}.length > 0`,b)):(a.let(w,!1),b()),i.result(w,()=>i.reset());function b(){const x=a.name("_valid"),A=a.let("count",0);_(x,()=>a.if(x,()=>S(A)))}function _(x,A){a.forRange("i",0,v,k=>{i.subschema({keyword:"contains",dataProp:k,dataPropType:t.Type.Num,compositeRule:!0},x),A()})}function S(x){a.code((0,e._)`${x}++`),h===void 0?a.if((0,e._)`${x} >= ${d}`,()=>a.assign(w,!0).break()):(a.if((0,e._)`${x} > ${h}`,()=>a.assign(w,!1).break()),d===1?a.assign(w,!0):a.if((0,e._)`${x} >= ${d}`,()=>a.assign(w,!0)))}}};return ah.default=r,ah}var Zx={},EI;function Xge(){return EI||(EI=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.validateSchemaDeps=e.validatePropertyDeps=e.error=void 0;const t=Xe(),n=ht(),r=Lr();e.error={message:({params:{property:c,depsCount:f,deps:d}})=>{const h=f===1?"property":"properties";return(0,t.str)`must have ${h} ${d} when property ${c} is present`},params:({params:{property:c,depsCount:f,deps:d,missingProperty:h}})=>(0,t._)`{property: ${c},
|
|
266
|
+
missingProperty: ${h},
|
|
267
|
+
depsCount: ${f},
|
|
268
|
+
deps: ${d}}`};const i={keyword:"dependencies",type:"object",schemaType:"object",error:e.error,code(c){const[f,d]=a(c);o(c,f),l(c,d)}};function a({schema:c}){const f={},d={};for(const h in c){if(h==="__proto__")continue;const m=Array.isArray(c[h])?f:d;m[h]=c[h]}return[f,d]}function o(c,f=c.schema){const{gen:d,data:h,it:m}=c;if(Object.keys(f).length===0)return;const g=d.let("missing");for(const v in f){const w=f[v];if(w.length===0)continue;const b=(0,r.propertyInData)(d,h,v,m.opts.ownProperties);c.setParams({property:v,depsCount:w.length,deps:w.join(", ")}),m.allErrors?d.if(b,()=>{for(const _ of w)(0,r.checkReportMissingProp)(c,_)}):(d.if((0,t._)`${b} && (${(0,r.checkMissingProp)(c,w,g)})`),(0,r.reportMissingProp)(c,g),d.else())}}e.validatePropertyDeps=o;function l(c,f=c.schema){const{gen:d,data:h,keyword:m,it:g}=c,v=d.name("valid");for(const w in f)(0,n.alwaysValidSchema)(g,f[w])||(d.if((0,r.propertyInData)(d,h,w,g.opts.ownProperties),()=>{const b=c.subschema({keyword:m,schemaProp:w},v);c.mergeValidEvaluated(b,v)},()=>d.var(v,!0)),c.ok(v))}e.validateSchemaDeps=l,e.default=i}(Zx)),Zx}var sh={},kI;function Wge(){if(kI)return sh;kI=1,Object.defineProperty(sh,"__esModule",{value:!0});const e=Xe(),t=ht(),r={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:i})=>(0,e._)`{propertyName: ${i.propertyName}}`},code(i){const{gen:a,schema:o,data:l,it:c}=i;if((0,t.alwaysValidSchema)(c,o))return;const f=a.name("valid");a.forIn("key",l,d=>{i.setParams({propertyName:d}),i.subschema({keyword:"propertyNames",data:d,dataTypes:["string"],propertyName:d,compositeRule:!0},f),a.if((0,e.not)(f),()=>{i.error(!0),c.allErrors||a.break()})}),i.ok(f)}};return sh.default=r,sh}var oh={},AI;function JL(){if(AI)return oh;AI=1,Object.defineProperty(oh,"__esModule",{value:!0});const e=Lr(),t=Xe(),n=La(),r=ht(),a={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:o})=>(0,t._)`{additionalProperty: ${o.additionalProperty}}`},code(o){const{gen:l,schema:c,parentSchema:f,data:d,errsCount:h,it:m}=o;if(!h)throw new Error("ajv implementation error");const{allErrors:g,opts:v}=m;if(m.props=!0,v.removeAdditional!=="all"&&(0,r.alwaysValidSchema)(m,c))return;const w=(0,e.allSchemaProperties)(f.properties),b=(0,e.allSchemaProperties)(f.patternProperties);_(),o.ok((0,t._)`${h} === ${n.default.errors}`);function _(){l.forIn("key",d,T=>{!w.length&&!b.length?A(T):l.if(S(T),()=>A(T))})}function S(T){let O;if(w.length>8){const $=(0,r.schemaRefOrVal)(m,f.properties,"properties");O=(0,e.isOwnProperty)(l,$,T)}else w.length?O=(0,t.or)(...w.map($=>(0,t._)`${T} === ${$}`)):O=t.nil;return b.length&&(O=(0,t.or)(O,...b.map($=>(0,t._)`${(0,e.usePattern)(o,$)}.test(${T})`))),(0,t.not)(O)}function x(T){l.code((0,t._)`delete ${d}[${T}]`)}function A(T){if(v.removeAdditional==="all"||v.removeAdditional&&c===!1){x(T);return}if(c===!1){o.setParams({additionalProperty:T}),o.error(),g||l.break();return}if(typeof c=="object"&&!(0,r.alwaysValidSchema)(m,c)){const O=l.name("valid");v.removeAdditional==="failing"?(k(T,O,!1),l.if((0,t.not)(O),()=>{o.reset(),x(T)})):(k(T,O),g||l.if((0,t.not)(O),()=>l.break()))}}function k(T,O,$){const L={keyword:"additionalProperties",dataProp:T,dataPropType:r.Type.Str};$===!1&&Object.assign(L,{compositeRule:!0,createErrors:!1,allErrors:!1}),o.subschema(L,O)}}};return oh.default=a,oh}var lh={},TI;function Qge(){if(TI)return lh;TI=1,Object.defineProperty(lh,"__esModule",{value:!0});const e=gm(),t=Lr(),n=ht(),r=JL(),i={keyword:"properties",type:"object",schemaType:"object",code(a){const{gen:o,schema:l,parentSchema:c,data:f,it:d}=a;d.opts.removeAdditional==="all"&&c.additionalProperties===void 0&&r.default.code(new e.KeywordCxt(d,r.default,"additionalProperties"));const h=(0,t.allSchemaProperties)(l);for(const b of h)d.definedProperties.add(b);d.opts.unevaluated&&h.length&&d.props!==!0&&(d.props=n.mergeEvaluated.props(o,(0,n.toHash)(h),d.props));const m=h.filter(b=>!(0,n.alwaysValidSchema)(d,l[b]));if(m.length===0)return;const g=o.name("valid");for(const b of m)v(b)?w(b):(o.if((0,t.propertyInData)(o,f,b,d.opts.ownProperties)),w(b),d.allErrors||o.else().var(g,!0),o.endIf()),a.it.definedProperties.add(b),a.ok(g);function v(b){return d.opts.useDefaults&&!d.compositeRule&&l[b].default!==void 0}function w(b){a.subschema({keyword:"properties",schemaProp:b,dataProp:b},g)}}};return lh.default=i,lh}var uh={},CI;function Jge(){if(CI)return uh;CI=1,Object.defineProperty(uh,"__esModule",{value:!0});const e=Lr(),t=Xe(),n=ht(),r=ht(),i={keyword:"patternProperties",type:"object",schemaType:"object",code(a){const{gen:o,schema:l,data:c,parentSchema:f,it:d}=a,{opts:h}=d,m=(0,e.allSchemaProperties)(l),g=m.filter(A=>(0,n.alwaysValidSchema)(d,l[A]));if(m.length===0||g.length===m.length&&(!d.opts.unevaluated||d.props===!0))return;const v=h.strictSchema&&!h.allowMatchingProperties&&f.properties,w=o.name("valid");d.props!==!0&&!(d.props instanceof t.Name)&&(d.props=(0,r.evaluatedPropsToName)(o,d.props));const{props:b}=d;_();function _(){for(const A of m)v&&S(A),d.allErrors?x(A):(o.var(w,!0),x(A),o.if(w))}function S(A){for(const k in v)new RegExp(A).test(k)&&(0,n.checkStrictMode)(d,`property ${k} matches pattern ${A} (use allowMatchingProperties)`)}function x(A){o.forIn("key",c,k=>{o.if((0,t._)`${(0,e.usePattern)(a,A)}.test(${k})`,()=>{const T=g.includes(A);T||a.subschema({keyword:"patternProperties",schemaProp:A,dataProp:k,dataPropType:r.Type.Str},w),d.opts.unevaluated&&b!==!0?o.assign((0,t._)`${b}[${k}]`,!0):!T&&!d.allErrors&&o.if((0,t.not)(w),()=>o.break())})})}}};return uh.default=i,uh}var ch={},OI;function eye(){if(OI)return ch;OI=1,Object.defineProperty(ch,"__esModule",{value:!0});const e=ht(),t={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(n){const{gen:r,schema:i,it:a}=n;if((0,e.alwaysValidSchema)(a,i)){n.fail();return}const o=r.name("valid");n.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},o),n.failResult(o,()=>n.reset(),()=>n.error())},error:{message:"must NOT be valid"}};return ch.default=t,ch}var fh={},NI;function tye(){if(NI)return fh;NI=1,Object.defineProperty(fh,"__esModule",{value:!0});const t={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:Lr().validateUnion,error:{message:"must match a schema in anyOf"}};return fh.default=t,fh}var dh={},RI;function nye(){if(RI)return dh;RI=1,Object.defineProperty(dh,"__esModule",{value:!0});const e=Xe(),t=ht(),r={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:i})=>(0,e._)`{passingSchemas: ${i.passing}}`},code(i){const{gen:a,schema:o,parentSchema:l,it:c}=i;if(!Array.isArray(o))throw new Error("ajv implementation error");if(c.opts.discriminator&&l.discriminator)return;const f=o,d=a.let("valid",!1),h=a.let("passing",null),m=a.name("_valid");i.setParams({passing:h}),a.block(g),i.result(d,()=>i.reset(),()=>i.error(!0));function g(){f.forEach((v,w)=>{let b;(0,t.alwaysValidSchema)(c,v)?a.var(m,!0):b=i.subschema({keyword:"oneOf",schemaProp:w,compositeRule:!0},m),w>0&&a.if((0,e._)`${m} && ${d}`).assign(d,!1).assign(h,(0,e._)`[${h}, ${w}]`).else(),a.if(m,()=>{a.assign(d,!0),a.assign(h,w),b&&i.mergeEvaluated(b,e.Name)})})}}};return dh.default=r,dh}var hh={},jI;function rye(){if(jI)return hh;jI=1,Object.defineProperty(hh,"__esModule",{value:!0});const e=ht(),t={keyword:"allOf",schemaType:"array",code(n){const{gen:r,schema:i,it:a}=n;if(!Array.isArray(i))throw new Error("ajv implementation error");const o=r.name("valid");i.forEach((l,c)=>{if((0,e.alwaysValidSchema)(a,l))return;const f=n.subschema({keyword:"allOf",schemaProp:c},o);n.ok(o),n.mergeEvaluated(f)})}};return hh.default=t,hh}var ph={},MI;function iye(){if(MI)return ph;MI=1,Object.defineProperty(ph,"__esModule",{value:!0});const e=Xe(),t=ht(),r={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:a})=>(0,e.str)`must match "${a.ifClause}" schema`,params:({params:a})=>(0,e._)`{failingKeyword: ${a.ifClause}}`},code(a){const{gen:o,parentSchema:l,it:c}=a;l.then===void 0&&l.else===void 0&&(0,t.checkStrictMode)(c,'"if" without "then" and "else" is ignored');const f=i(c,"then"),d=i(c,"else");if(!f&&!d)return;const h=o.let("valid",!0),m=o.name("_valid");if(g(),a.reset(),f&&d){const w=o.let("ifClause");a.setParams({ifClause:w}),o.if(m,v("then",w),v("else",w))}else f?o.if(m,v("then")):o.if((0,e.not)(m),v("else"));a.pass(h,()=>a.error(!0));function g(){const w=a.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},m);a.mergeEvaluated(w)}function v(w,b){return()=>{const _=a.subschema({keyword:w},m);o.assign(h,m),a.mergeValidEvaluated(_,h),b?o.assign(b,(0,e._)`${w}`):a.setParams({ifClause:w})}}}};function i(a,o){const l=a.schema[o];return l!==void 0&&!(0,t.alwaysValidSchema)(a,l)}return ph.default=r,ph}var mh={},$I;function aye(){if($I)return mh;$I=1,Object.defineProperty(mh,"__esModule",{value:!0});const e=ht(),t={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:n,parentSchema:r,it:i}){r.if===void 0&&(0,e.checkStrictMode)(i,`"${n}" without "if" is ignored`)}};return mh.default=t,mh}var DI;function sye(){if(DI)return nh;DI=1,Object.defineProperty(nh,"__esModule",{value:!0});const e=WL(),t=Yge(),n=QL(),r=Zge(),i=Kge(),a=Xge(),o=Wge(),l=JL(),c=Qge(),f=Jge(),d=eye(),h=tye(),m=nye(),g=rye(),v=iye(),w=aye();function b(_=!1){const S=[d.default,h.default,m.default,g.default,v.default,w.default,o.default,l.default,a.default,c.default,f.default];return _?S.push(t.default,r.default):S.push(e.default,n.default),S.push(i.default),S}return nh.default=b,nh}var gh={},yh={},II;function oye(){if(II)return yh;II=1,Object.defineProperty(yh,"__esModule",{value:!0});const e=Xe(),n={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:r})=>(0,e.str)`must match format "${r}"`,params:({schemaCode:r})=>(0,e._)`{format: ${r}}`},code(r,i){const{gen:a,data:o,$data:l,schema:c,schemaCode:f,it:d}=r,{opts:h,errSchemaPath:m,schemaEnv:g,self:v}=d;if(!h.validateFormats)return;l?w():b();function w(){const _=a.scopeValue("formats",{ref:v.formats,code:h.code.formats}),S=a.const("fDef",(0,e._)`${_}[${f}]`),x=a.let("fType"),A=a.let("format");a.if((0,e._)`typeof ${S} == "object" && !(${S} instanceof RegExp)`,()=>a.assign(x,(0,e._)`${S}.type || "string"`).assign(A,(0,e._)`${S}.validate`),()=>a.assign(x,(0,e._)`"string"`).assign(A,S)),r.fail$data((0,e.or)(k(),T()));function k(){return h.strictSchema===!1?e.nil:(0,e._)`${f} && !${A}`}function T(){const O=g.$async?(0,e._)`(${S}.async ? await ${A}(${o}) : ${A}(${o}))`:(0,e._)`${A}(${o})`,$=(0,e._)`(typeof ${A} == "function" ? ${O} : ${A}.test(${o}))`;return(0,e._)`${A} && ${A} !== true && ${x} === ${i} && !${$}`}}function b(){const _=v.formats[c];if(!_){k();return}if(_===!0)return;const[S,x,A]=T(_);S===i&&r.pass(O());function k(){if(h.strictSchema===!1){v.logger.warn($());return}throw new Error($());function $(){return`unknown format "${c}" ignored in schema at path "${m}"`}}function T($){const L=$ instanceof RegExp?(0,e.regexpCode)($):h.code.formats?(0,e._)`${h.code.formats}${(0,e.getProperty)(c)}`:void 0,M=a.scopeValue("formats",{key:c,ref:$,code:L});return typeof $=="object"&&!($ instanceof RegExp)?[$.type||"string",$.validate,(0,e._)`${M}.validate`]:["string",$,M]}function O(){if(typeof _=="object"&&!(_ instanceof RegExp)&&_.async){if(!g.$async)throw new Error("async format in sync schema");return(0,e._)`await ${A}(${o})`}return typeof x=="function"?(0,e._)`${A}(${o})`:(0,e._)`${A}.test(${o})`}}}};return yh.default=n,yh}var PI;function lye(){if(PI)return gh;PI=1,Object.defineProperty(gh,"__esModule",{value:!0});const t=[oye().default];return gh.default=t,gh}var os={},LI;function uye(){return LI||(LI=1,Object.defineProperty(os,"__esModule",{value:!0}),os.contentVocabulary=os.metadataVocabulary=void 0,os.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],os.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]),os}var zI;function cye(){if(zI)return qd;zI=1,Object.defineProperty(qd,"__esModule",{value:!0});const e=$ge(),t=Gge(),n=sye(),r=lye(),i=uye(),a=[e.default,t.default,(0,n.default)(),r.default,i.metadataVocabulary,i.contentVocabulary];return qd.default=a,qd}var bh={},Du={},qI;function fye(){if(qI)return Du;qI=1,Object.defineProperty(Du,"__esModule",{value:!0}),Du.DiscrError=void 0;var e;return function(t){t.Tag="tag",t.Mapping="mapping"}(e||(Du.DiscrError=e={})),Du}var FI;function dye(){if(FI)return bh;FI=1,Object.defineProperty(bh,"__esModule",{value:!0});const e=Xe(),t=fye(),n=qE(),r=ym(),i=ht(),o={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:l,tagName:c}})=>l===t.DiscrError.Tag?`tag "${c}" must be string`:`value of tag "${c}" must be in oneOf`,params:({params:{discrError:l,tag:c,tagName:f}})=>(0,e._)`{error: ${l}, tag: ${f}, tagValue: ${c}}`},code(l){const{gen:c,data:f,schema:d,parentSchema:h,it:m}=l,{oneOf:g}=h;if(!m.opts.discriminator)throw new Error("discriminator: requires discriminator option");const v=d.propertyName;if(typeof v!="string")throw new Error("discriminator: requires propertyName");if(d.mapping)throw new Error("discriminator: mapping is not supported");if(!g)throw new Error("discriminator: requires oneOf keyword");const w=c.let("valid",!1),b=c.const("tag",(0,e._)`${f}${(0,e.getProperty)(v)}`);c.if((0,e._)`typeof ${b} == "string"`,()=>_(),()=>l.error(!1,{discrError:t.DiscrError.Tag,tag:b,tagName:v})),l.ok(w);function _(){const A=x();c.if(!1);for(const k in A)c.elseIf((0,e._)`${b} === ${k}`),c.assign(w,S(A[k]));c.else(),l.error(!1,{discrError:t.DiscrError.Mapping,tag:b,tagName:v}),c.endIf()}function S(A){const k=c.name("valid"),T=l.subschema({keyword:"oneOf",schemaProp:A},k);return l.mergeEvaluated(T,e.Name),k}function x(){var A;const k={},T=$(h);let O=!0;for(let z=0;z<g.length;z++){let P=g[z];if(P!=null&&P.$ref&&!(0,i.schemaHasRulesButRef)(P,m.self.RULES)){const D=P.$ref;if(P=n.resolveRef.call(m.self,m.schemaEnv.root,m.baseId,D),P instanceof n.SchemaEnv&&(P=P.schema),P===void 0)throw new r.default(m.opts.uriResolver,m.baseId,D)}const q=(A=P==null?void 0:P.properties)===null||A===void 0?void 0:A[v];if(typeof q!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${v}"`);O=O&&(T||$(P)),L(q,z)}if(!O)throw new Error(`discriminator: "${v}" must be required`);return k;function $({required:z}){return Array.isArray(z)&&z.includes(v)}function L(z,P){if(z.const)M(z.const,P);else if(z.enum)for(const q of z.enum)M(q,P);else throw new Error(`discriminator: "properties/${v}" must have "const" or "enum"`)}function M(z,P){if(typeof z!="string"||z in k)throw new Error(`discriminator: "${v}" values must be unique strings`);k[z]=P}}}};return bh.default=o,bh}const hye="http://json-schema.org/draft-07/schema#",pye="http://json-schema.org/draft-07/schema#",mye="Core schema meta-schema",gye={schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},yye=["object","boolean"],bye={$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},vye={$schema:hye,$id:pye,title:mye,definitions:gye,type:yye,properties:bye,default:!0};var BI;function e8(){return BI||(BI=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.MissingRefError=t.ValidationError=t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=t.Ajv=void 0;const n=Rge(),r=cye(),i=dye(),a=vye,o=["/properties"],l="http://json-schema.org/draft-07/schema";class c extends n.default{_addVocabularies(){super._addVocabularies(),r.default.forEach(v=>this.addVocabulary(v)),this.opts.discriminator&&this.addKeyword(i.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const v=this.opts.$data?this.$dataMetaSchema(a,o):a;this.addMetaSchema(v,l,!1),this.refs["http://json-schema.org/schema"]=l}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(l)?l:void 0)}}t.Ajv=c,e.exports=t=c,e.exports.Ajv=c,Object.defineProperty(t,"__esModule",{value:!0}),t.default=c;var f=gm();Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return f.KeywordCxt}});var d=Xe();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return d._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return d.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return d.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return d.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return d.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return d.CodeGen}});var h=zE();Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return h.default}});var m=ym();Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return m.default}})}(Dd,Dd.exports)),Dd.exports}var _ye=e8();const xye=zn(_ye);var vh={exports:{}},Kx={},UI;function wye(){return UI||(UI=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.formatNames=e.fastFormats=e.fullFormats=void 0;function t(L,M){return{validate:L,compare:M}}e.fullFormats={date:t(a,o),time:t(c,f),"date-time":t(h,m),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:w,"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:$,uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:_,int32:{type:"number",validate:A},int64:{type:"number",validate:k},float:{type:"number",validate:T},double:{type:"number",validate:T},password:!0,binary:!0},e.fastFormats={...e.fullFormats,date:t(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,o),time:t(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,f),"date-time":t(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,m),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i},e.formatNames=Object.keys(e.fullFormats);function n(L){return L%4===0&&(L%100!==0||L%400===0)}const r=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,i=[0,31,28,31,30,31,30,31,31,30,31,30,31];function a(L){const M=r.exec(L);if(!M)return!1;const z=+M[1],P=+M[2],q=+M[3];return P>=1&&P<=12&&q>=1&&q<=(P===2&&n(z)?29:i[P])}function o(L,M){if(L&&M)return L>M?1:L<M?-1:0}const l=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i;function c(L,M){const z=l.exec(L);if(!z)return!1;const P=+z[1],q=+z[2],D=+z[3],H=z[5];return(P<=23&&q<=59&&D<=59||P===23&&q===59&&D===60)&&(!M||H!=="")}function f(L,M){if(!(L&&M))return;const z=l.exec(L),P=l.exec(M);if(z&&P)return L=z[1]+z[2]+z[3]+(z[4]||""),M=P[1]+P[2]+P[3]+(P[4]||""),L>M?1:L<M?-1:0}const d=/t|\s/i;function h(L){const M=L.split(d);return M.length===2&&a(M[0])&&c(M[1],!0)}function m(L,M){if(!(L&&M))return;const[z,P]=L.split(d),[q,D]=M.split(d),H=o(z,q);if(H!==void 0)return H||f(P,D)}const g=/\/|:/,v=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;function w(L){return g.test(L)&&v.test(L)}const b=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function _(L){return b.lastIndex=0,b.test(L)}const S=-2147483648,x=2**31-1;function A(L){return Number.isInteger(L)&&L<=x&&L>=S}function k(L){return Number.isInteger(L)}function T(){return!0}const O=/[^\\]\\Z/;function $(L){if(O.test(L))return!1;try{return new RegExp(L),!0}catch{return!1}}}(Kx)),Kx}var Xx={},VI;function Sye(){return VI||(VI=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.formatLimitDefinition=void 0;const t=e8(),n=Xe(),r=n.operators,i={formatMaximum:{okStr:"<=",ok:r.LTE,fail:r.GT},formatMinimum:{okStr:">=",ok:r.GTE,fail:r.LT},formatExclusiveMaximum:{okStr:"<",ok:r.LT,fail:r.GTE},formatExclusiveMinimum:{okStr:">",ok:r.GT,fail:r.LTE}},a={message:({keyword:l,schemaCode:c})=>n.str`should be ${i[l].okStr} ${c}`,params:({keyword:l,schemaCode:c})=>n._`{comparison: ${i[l].okStr}, limit: ${c}}`};e.formatLimitDefinition={keyword:Object.keys(i),type:"string",schemaType:"string",$data:!0,error:a,code(l){const{gen:c,data:f,schemaCode:d,keyword:h,it:m}=l,{opts:g,self:v}=m;if(!g.validateFormats)return;const w=new t.KeywordCxt(m,v.RULES.all.format.definition,"format");w.$data?b():_();function b(){const x=c.scopeValue("formats",{ref:v.formats,code:g.code.formats}),A=c.const("fmt",n._`${x}[${w.schemaCode}]`);l.fail$data(n.or(n._`typeof ${A} != "object"`,n._`${A} instanceof RegExp`,n._`typeof ${A}.compare != "function"`,S(A)))}function _(){const x=w.schema,A=v.formats[x];if(!A||A===!0)return;if(typeof A!="object"||A instanceof RegExp||typeof A.compare!="function")throw new Error(`"${h}": format "${x}" does not define "compare" function`);const k=c.scopeValue("formats",{key:x,ref:A,code:g.code.formats?n._`${g.code.formats}${n.getProperty(x)}`:void 0});l.fail$data(S(k))}function S(x){return n._`${x}.compare(${f}, ${d}) ${i[h].fail} 0`}},dependencies:["format"]};const o=l=>(l.addKeyword(e.formatLimitDefinition),l);e.default=o}(Xx)),Xx}var HI;function Eye(){return HI||(HI=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0});const n=wye(),r=Sye(),i=Xe(),a=new i.Name("fullFormats"),o=new i.Name("fastFormats"),l=(f,d={keywords:!0})=>{if(Array.isArray(d))return c(f,d,n.fullFormats,a),f;const[h,m]=d.mode==="fast"?[n.fastFormats,o]:[n.fullFormats,a],g=d.formats||n.formatNames;return c(f,g,h,m),d.keywords&&r.default(f),f};l.get=(f,d="full")=>{const m=(d==="fast"?n.fastFormats:n.fullFormats)[f];if(!m)throw new Error(`Unknown format "${f}"`);return m};function c(f,d,h,m){var g,v;(g=(v=f.opts.code).formats)!==null&&g!==void 0||(v.formats=i._`require("ajv-formats/dist/formats").${m}`);for(const w of d)f.addFormat(w,h[w])}e.exports=t=l,Object.defineProperty(t,"__esModule",{value:!0}),t.default=l}(vh,vh.exports)),vh.exports}var kye=Eye();const GI=zn(kye),Aye={allErrors:!0,multipleOfPrecision:8,strict:!1,verbose:!0,discriminator:!1},Tye=/^(#?([0-9A-Fa-f]{3}){1,2}\b|aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow|(rgb\(\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*,\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*,\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*\))|(rgb\(\s*(\d?\d%|100%)+\s*,\s*(\d?\d%|100%)+\s*,\s*(\d?\d%|100%)+\s*\)))$/,Cye=/^data:([a-z]+\/[a-z0-9-+.]+)?;(?:name=(.*);)?base64,(.*)$/;function Oye(e,t,n={},r,i=xye){const a=new i({...Aye,...n});return r?GI(a,r):r!==!1&&GI(a),a.addFormat("data-url",Cye),a.addFormat("color",Tye),a.addKeyword(Mc),a.addKeyword(PS),Array.isArray(e)&&a.addMetaSchema(e),Mt(t)&&Object.keys(t).forEach(o=>{a.addFormat(o,t[o])}),a}function Nye(e=[],t){return e.map(n=>{var r;const{instancePath:i,keyword:a,params:o,schemaPath:l,parentSchema:c,...f}=n;let{message:d=""}=f,h=i.replace(/\//g,"."),m=`${h} ${d}`.trim();const g=[...((r=o.deps)===null||r===void 0?void 0:r.split(", "))||[],o.missingProperty,o.property].filter(v=>v);if(g.length>0)g.forEach(v=>{const w=h?`${h}.${v}`:v;let b=ot(Ne(t,`${w.replace(/^\./,"")}`)).title;if(b===void 0){const _=l.replace(/\/properties\//g,"/").split("/").slice(1,-1).concat([v]);b=ot(Ne(t,_)).title}if(b)d=d.replace(`'${v}'`,`'${b}'`);else{const _=Ne(c,[Bt,v,"title"]);_&&(d=d.replace(`'${v}'`,`'${_}'`))}}),m=d;else{const v=ot(Ne(t,`${h.replace(/^\./,"")}`)).title;if(v)m=`'${v}' ${d}`.trim();else{const w=c==null?void 0:c.title;w&&(m=`'${w}' ${d}`.trim())}}return"missingProperty"in o&&(h=h?`${h}.${o.missingProperty}`:o.missingProperty),{name:a,property:h,message:d,params:o,stack:m,schemaPath:l}})}function Rye(e,t,n,r,i,a,o){const{validationError:l}=t;let c=Nye(t.errors,o);l&&(c=[...c,{stack:l.message}]),typeof a=="function"&&(c=a(c,o));let f=Ihe(c);if(l&&(f={...f,$schema:{__errors:[l.message]}}),typeof i!="function")return{errors:c,errorSchema:f};const d=AL(e,r,n,r,!0),h=i(d,fp(d),o),m=DE(h);return jh({errors:c,errorSchema:f},m)}class jye{constructor(t,n){const{additionalMetaSchemas:r,customFormats:i,ajvOptionsOverrides:a,ajvFormatOptions:o,AjvClass:l}=t;this.ajv=Oye(r,i,a,o,l),this.localizer=n}reset(){this.ajv.removeSchema()}toErrorList(t,n=[]){return wc(t,n)}rawValidation(t,n){var r,i;let a,o;t[Ra]&&(o=this.ajv.getSchema(t[Ra]));try{o===void 0&&(o=this.ajv.compile(t)),o(n)}catch(c){a=c}let l;return o&&(typeof this.localizer=="function"&&(((r=o.errors)!==null&&r!==void 0?r:[]).forEach(c=>{var f;["missingProperty","property"].forEach(d=>{var h;!((h=c.params)===null||h===void 0)&&h[d]&&(c.params[d]=`'${c.params[d]}'`)}),!((f=c.params)===null||f===void 0)&&f.deps&&(c.params.deps=c.params.deps.split(", ").map(d=>`'${d}'`).join(", "))}),this.localizer(o.errors),((i=o.errors)!==null&&i!==void 0?i:[]).forEach(c=>{var f;["missingProperty","property"].forEach(d=>{var h;!((h=c.params)===null||h===void 0)&&h[d]&&(c.params[d]=c.params[d].slice(1,-1))}),!((f=c.params)===null||f===void 0)&&f.deps&&(c.params.deps=c.params.deps.split(", ").map(d=>d.slice(1,-1)).join(", "))})),l=o.errors||void 0,o.errors=null),{errors:l,validationError:a}}validateFormData(t,n,r,i,a){const o=this.rawValidation(n,t);return Rye(this,o,t,n,r,i,a)}handleSchemaUpdate(t){var n,r;const i=(n=t[Ra])!==null&&n!==void 0?n:UP;this.ajv.getSchema(i)===void 0?this.ajv.addSchema(t,i):It(t,(r=this.ajv.getSchema(i))===null||r===void 0?void 0:r.schema)||(this.ajv.removeSchema(i),this.ajv.addSchema(t,i))}isValid(t,n,r){var i;try{this.handleSchemaUpdate(r);const a=IE(t),o=(i=a[Ra])!==null&&i!==void 0?i:Nhe(a);let l;return l=this.ajv.getSchema(o),l===void 0&&(l=this.ajv.addSchema(a,o).getSchema(o)||this.ajv.compile(a)),l(n)}catch(a){return console.warn("Error encountered compiling schema:",a),!1}}}function Mye(e={},t){return new jye(e,t)}const $ye=Mye(),Dye=e=>{var i,a,o,l;const t=(i=e.options)==null?void 0:i.minLength,n=(a=e.options)==null?void 0:a.maxLength,r=((o=e.value)==null?void 0:o.length)||0;return N.jsxs("div",{className:"mb-4",children:[e.label&&N.jsxs("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:[e.label,e.required&&N.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),N.jsx("input",{type:"text",className:"w-full px-3 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent transition-colors",value:e.value||"",onChange:c=>e.onChange(c.target.value),placeholder:e.placeholder,disabled:e.disabled,maxLength:n?e.options.maxLength:void 0}),e.description&&N.jsx("p",{className:"text-xs text-gray-500 mt-1",children:e.description}),(t||n)&&N.jsx("div",{className:"flex justify-end mt-1",children:N.jsx("span",{className:`text-xs ${r>(((l=e.options)==null?void 0:l.maxLength)||0)?"text-red-500":"text-gray-400"}`,children:t&&n?`${r}/${e.options.maxLength} (最少${e.options.minLength})`:n?`${r}/${e.options.maxLength}`:`最少${e.options.minLength}字符`})})]})},Iye=e=>{const[t,n]=te.useState(!1);return N.jsxs("div",{className:"mb-4",children:[e.label&&N.jsxs("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:[e.label,e.required&&N.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),N.jsxs("div",{className:"relative",children:[N.jsx("input",{type:t?"text":"password",className:"w-full px-3 py-2 pr-10 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent transition-colors",value:e.value||"",onChange:r=>e.onChange(r.target.value),placeholder:e.placeholder,disabled:e.disabled}),N.jsx("button",{type:"button",className:"absolute right-3 top-1/2 transform -translate-y-1/2 text-gray-400 hover:text-gray-600",onClick:()=>n(!t),children:t?N.jsx(bX,{size:16}):N.jsx(_X,{size:16})})]}),e.description&&N.jsx("p",{className:"text-xs text-gray-500 mt-1",children:e.description})]})},Pye=e=>{var i,a,o,l,c;const t=(i=e.options)==null?void 0:i.minLength,n=(a=e.options)==null?void 0:a.maxLength,r=((o=e.value)==null?void 0:o.length)||0;return N.jsxs("div",{className:"mb-4",children:[e.label&&N.jsxs("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:[e.label,e.required&&N.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),N.jsx("textarea",{className:"w-full px-3 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent transition-colors resize-vertical",value:e.value||"",onChange:f=>e.onChange(f.target.value),placeholder:e.placeholder,disabled:e.disabled,rows:((l=e.options)==null?void 0:l.rows)||4,maxLength:n?e.options.maxLength:void 0}),e.description&&N.jsx("p",{className:"text-xs text-gray-500 mt-1",children:e.description}),(t||n)&&N.jsx("div",{className:"flex justify-end mt-1",children:N.jsx("span",{className:`text-xs ${r>(((c=e.options)==null?void 0:c.maxLength)||0)?"text-red-500":"text-gray-400"}`,children:t&&n?`${r}/${e.options.maxLength} (最少${e.options.minLength})`:n?`${r}/${e.options.maxLength}`:`最少${e.options.minLength}字符`})})]})},Lye=e=>{var t,n;return N.jsxs("div",{className:"mb-4",children:[e.label&&N.jsxs("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:[e.label,e.required&&N.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),N.jsxs("div",{className:"relative",children:[N.jsxs("select",{className:"w-full px-3 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent transition-colors appearance-none",value:e.value||"",onChange:r=>e.onChange(r.target.value),disabled:e.disabled,children:[e.placeholder&&N.jsx("option",{value:"",disabled:!0,children:e.placeholder}),(n=(t=e.options)==null?void 0:t.enumOptions)==null?void 0:n.map((r,i)=>N.jsx("option",{value:r.value,children:r.label},i))]}),N.jsx(L5,{size:16,className:"absolute right-3 top-1/2 transform -translate-y-1/2 text-gray-400 pointer-events-none"})]}),e.description&&N.jsx("p",{className:"text-xs text-gray-500 mt-1",children:e.description})]})},zye=e=>{var t,n;return N.jsxs("div",{className:"mb-4",children:[e.label&&N.jsxs("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:[e.label,e.required&&N.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),N.jsx("div",{className:"space-y-2",children:(n=(t=e.options)==null?void 0:t.enumOptions)==null?void 0:n.map((r,i)=>{var a;return N.jsxs("label",{className:"flex items-center",children:[N.jsx("input",{type:"checkbox",className:"w-4 h-4 text-blue-600 border-gray-300 rounded focus:ring-blue-500 focus:ring-2",checked:((a=e.value)==null?void 0:a.includes(r.value))||!1,onChange:o=>{const l=e.value||[];o.target.checked?e.onChange([...l,r.value]):e.onChange(l.filter(c=>c!==r.value))},disabled:e.disabled}),N.jsx("span",{className:"ml-2 text-sm text-gray-700",children:r.label})]},i)})}),e.description&&N.jsx("p",{className:"text-xs text-gray-500 mt-1",children:e.description})]})},qye=e=>{var t,n;return N.jsxs("div",{className:"mb-4",children:[e.label&&N.jsxs("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:[e.label,e.required&&N.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),N.jsx("div",{className:"space-y-2",children:(n=(t=e.options)==null?void 0:t.enumOptions)==null?void 0:n.map((r,i)=>N.jsxs("label",{className:"flex items-center",children:[N.jsx("input",{type:"radio",name:e.id,className:"w-4 h-4 text-blue-600 border-gray-300 focus:ring-blue-500 focus:ring-2",value:r.value,checked:e.value===r.value,onChange:a=>e.onChange(a.target.value),disabled:e.disabled}),N.jsx("span",{className:"ml-2 text-sm text-gray-700",children:r.label})]},i))}),e.description&&N.jsx("p",{className:"text-xs text-gray-500 mt-1",children:e.description})]})},Fye=e=>{var t,n,r;return N.jsxs("div",{className:"mb-4",children:[e.label&&N.jsxs("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:[e.label,e.required&&N.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),N.jsx("input",{type:"number",className:"w-full px-3 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent transition-colors",value:e.value||"",onChange:i=>e.onChange(Number(i.target.value)),placeholder:e.placeholder,disabled:e.disabled,min:(t=e.options)==null?void 0:t.min,max:(n=e.options)==null?void 0:n.max,step:(r=e.options)==null?void 0:r.step}),e.description&&N.jsx("p",{className:"text-xs text-gray-500 mt-1",children:e.description})]})},Bye=e=>{var t,n,r,i,a,o;return N.jsxs("div",{className:"mb-4",children:[e.label&&N.jsxs("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:[e.label,e.required&&N.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),N.jsxs("div",{className:"px-2",children:[N.jsx("input",{type:"range",className:"w-full h-2 bg-gray-200 rounded-lg appearance-none cursor-pointer slider",value:e.value||((t=e.options)==null?void 0:t.min)||0,onChange:l=>e.onChange(Number(l.target.value)),disabled:e.disabled,min:((n=e.options)==null?void 0:n.min)||0,max:((r=e.options)==null?void 0:r.max)||100,step:((i=e.options)==null?void 0:i.step)||1}),N.jsxs("div",{className:"flex justify-between text-xs text-gray-500 mt-1",children:[N.jsx("span",{children:((a=e.options)==null?void 0:a.min)||0}),N.jsx("span",{className:"font-medium text-blue-600",children:e.value}),N.jsx("span",{children:((o=e.options)==null?void 0:o.max)||100})]})]}),e.description&&N.jsx("p",{className:"text-xs text-gray-500 mt-1",children:e.description})]})},Uye=e=>N.jsxs("div",{className:"mb-4",children:[e.label&&N.jsxs("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:[e.label,e.required&&N.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),N.jsx("input",{type:"date",className:"w-full px-3 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent transition-colors",value:e.value||"",onChange:t=>e.onChange(t.target.value),disabled:e.disabled}),e.description&&N.jsx("p",{className:"text-xs text-gray-500 mt-1",children:e.description})]}),Vye=e=>N.jsxs("div",{className:"mb-4",children:[e.label&&N.jsxs("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:[e.label,e.required&&N.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),N.jsx("input",{type:"datetime-local",className:"w-full px-3 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent transition-colors",value:e.value||"",onChange:t=>e.onChange(t.target.value),disabled:e.disabled}),e.description&&N.jsx("p",{className:"text-xs text-gray-500 mt-1",children:e.description})]}),Hye=e=>N.jsxs("div",{className:"mb-4",children:[e.label&&N.jsxs("label",{className:"flex items-center",children:[N.jsx("input",{type:"checkbox",className:"w-4 h-4 text-blue-600 border-gray-300 rounded focus:ring-blue-500 focus:ring-2 mr-2",checked:e.value||!1,onChange:t=>e.onChange(t.target.checked),disabled:e.disabled}),N.jsxs("span",{className:"text-sm text-gray-700",children:[e.label,e.required&&N.jsx("span",{className:"text-red-500 ml-1",children:"*"})]})]}),e.description&&N.jsx("p",{className:"text-xs text-gray-500 mt-1 ml-6",children:e.description})]}),Gye=e=>{const t=n=>{const r=n.target.files;e.multiple?e.onChange(r):e.onChange((r==null?void 0:r[0])||null)};return N.jsxs("div",{className:"mb-4",children:[e.label&&N.jsxs("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:[e.label,e.required&&N.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),N.jsx("input",{type:"file",className:"w-full px-3 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent transition-colors file:mr-3 file:py-1 file:px-3 file:border-0 file:bg-blue-50 file:text-blue-700 file:rounded file:font-medium",onChange:t,disabled:e.disabled,multiple:e.multiple,accept:e.accept}),e.description&&N.jsx("p",{className:"text-xs text-gray-500 mt-1",children:e.description})]})},Yye=e=>N.jsxs("div",{className:"mb-4",children:[e.label&&N.jsxs("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:[e.label,e.required&&N.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),N.jsxs("div",{className:"space-y-2",children:[e.items.map((t,n)=>N.jsxs("div",{className:"flex items-start gap-2 p-3 border border-gray-200 rounded-lg",children:[N.jsx("div",{className:"flex-1",children:t.children}),N.jsx("button",{type:"button",className:"p-1 text-red-500 hover:text-red-700 hover:bg-red-50 rounded",onClick:()=>e.onDropIndexClick(n)(),children:N.jsx(z5,{size:16})})]},n)),N.jsxs("button",{type:"button",className:"flex items-center gap-1 px-3 py-1 text-sm bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors",onClick:()=>e.onAddClick(),children:[N.jsx($X,{size:14}),"添加项目"]})]}),e.description&&N.jsx("p",{className:"text-xs text-gray-500 mt-1",children:e.description})]}),Zye=e=>N.jsx("div",{className:`${e.className} mb-4`,children:e.children}),Kye=e=>N.jsxs("div",{className:"mb-4",children:[e.title&&N.jsx("h3",{className:"text-sm font-medium text-gray-700 mb-2",children:e.title}),N.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4 pl-4 border-l-2 border-gray-200",children:e.properties.map(t=>N.jsx("div",{children:t.content},t.name))}),e.description&&N.jsx("p",{className:"text-xs text-gray-500 mt-1",children:e.description})]}),YI=e=>N.jsx("button",{type:"submit",className:"px-4 py-2 rounded-lg bg-blue-500 hover:bg-blue-600 disabled:bg-gray-300 text-white font-medium focus:outline-none focus:ring-2 focus:ring-blue-400 transition-colors disabled:cursor-not-allowed",disabled:e.disabled,children:e.submitText||"提交"}),Xye=a3({name:"show_form",description:"显示动态表单,等待用户填写",parameters:{schema:Wq()},onlyRender:!1,handler:s3.waitForUIDone,render(e){const t=e.getInputRepaired(),n=e.getJSONOutputSafe(),r=t.schema,i=c=>{console.log("Form submitted:",c),e.response(c)},a={text:Dye,password:Iye,textarea:Pye,select:Lye,checkboxes:zye,radio:qye,number:Fye,range:Bye,date:Uye,datetime:Vye,file:Gye,boolean:Hye},o={array:Yye},l={FieldTemplate:Zye,ObjectFieldTemplate:Kye,ButtonTemplates:{SubmitButton:YI}};return N.jsxs("div",{className:"p-4 bg-white rounded-lg border border-gray-200",children:[N.jsxs("div",{className:"flex items-center gap-1.5 text-gray-700 mb-3 font-bold",children:[N.jsx(EX,{className:"w-4 h-4 text-blue-500"}),N.jsx("span",{children:"AI 表单"})]}),N.jsx(mge,{children:N.jsx(pge,{readonly:e.state==="done",schema:r,formData:n,onSubmit:c=>i(c.formData),validator:$ye,onError:c=>{console.error("表单校验错误:",c),alert("表单填写有误,请检查后再提交。")},widgets:a,fields:o,templates:l,className:"custom-form",children:N.jsx("div",{className:"flex gap-2 mt-4",children:N.jsx(YI,{})})})})]})}}),Wye=a3({name:"create_artifacts",description:"创建并保存代码文件到 artifacts 目录",parameters:{},onlyRender:!0,render(e){const t=e.getInputRepaired(),{setCurrentArtifactById:n,currentArtifact:r}=zp(),i=()=>{n(e.message.id)};return N.jsxs("div",{className:"p-4 space-y-4",children:[N.jsxs("div",{className:"text-sm text-gray-500",children:["创建文件: ",t.filename,".",t.filetype]}),N.jsx("div",{className:"border rounded-lg p-2 hover:bg-gray-50",children:N.jsxs("div",{className:"flex items-center justify-between select-none cursor-pointer",onClick:i,children:[N.jsxs("div",{className:"flex items-center gap-2",children:[N.jsx(AX,{className:"w-4 h-4"}),N.jsx("span",{className:"font-xs",children:t.filename})]}),N.jsxs("span",{className:"text-gray-400",children:[t.filetype," ",(r==null?void 0:r.id)===e.message.id?"▼":"▶"]})]})})]})}}),Qye=()=>{const{renderMessages:e,loading:t,inChatError:n,client:r,collapsedTools:i,toggleToolCollapse:a,isFELocking:o}=Ts(),l=te.useRef(null),c=te.useRef(null),f=()=>{if(!c.current)return!1;const h=c.current,m=h.scrollTop+h.clientHeight;return h.scrollHeight-m<=50},d=()=>{var h;(h=l.current)==null||h.scrollIntoView({behavior:"instant"})};return te.useEffect(()=>{e.length>0&&c.current&&(t||d(),t&&f()&&d())},[e]),N.jsxs("div",{className:"flex-1 overflow-y-auto overflow-x-hidden p-4",ref:c,children:[N.jsx(I5,{renderMessages:e,collapsedTools:i,toggleToolCollapse:a,client:r}),t&&!o()&&N.jsxs("div",{className:"flex items-center justify-center py-4 text-gray-500",children:[N.jsx("div",{className:"animate-spin rounded-full h-4 w-4 border-2 border-blue-500 border-t-transparent mr-2"}),"正在思考中..."]}),n&&N.jsx("div",{className:"p-4 text-sm text-red-600 bg-red-50 rounded-lg border border-red-200",children:JSON.stringify(n)}),N.jsx("div",{ref:l})]})},Jye=()=>{const{userInput:e,setUserInput:t,loading:n,sendMessage:r,stopGeneration:i,currentAgent:a,setCurrentAgent:o,client:l,currentChatId:c}=Ts(),{extraParams:f}=F5(),[d,h]=te.useState([]),m=b=>{h(_=>[..._,{type:"image_url",image_url:{url:b}}])},g=b=>{localStorage.setItem("agent_name",b),o(b)},v=()=>{const b=[{type:"human",content:[{type:"text",text:e},...d]}];r(b,{extraParams:f}),h([])},w=b=>{b.key==="Enter"&&!b.shiftKey&&(b.preventDefault(),v())};return N.jsxs("div",{className:"border-t border-gray-200 p-4",children:[N.jsxs("div",{className:"flex items-center justify-between mb-4",children:[N.jsx(GX,{onFileUploaded:m}),N.jsx("select",{value:a,onChange:b=>g(b.target.value),className:"px-3 py-1.5 text-sm border border-gray-200 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent",children:l==null?void 0:l.availableAssistants.map(b=>N.jsx("option",{value:b.graph_id,children:b.name},b.graph_id))})]}),N.jsxs("div",{className:"flex gap-2",children:[N.jsx("textarea",{className:"flex-1 p-3 text-sm border border-gray-200 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent resize-none",rows:2,value:e,onChange:b=>t(b.target.value),onKeyDown:w,placeholder:"输入消息...",disabled:n}),N.jsx("button",{className:`px-4 py-2 text-sm font-medium text-white rounded-lg focus:outline-none focus:ring-2 focus:ring-offset-2 ${n?"bg-red-500 hover:bg-red-600 focus:ring-red-500":"bg-blue-500 hover:bg-blue-600 focus:ring-blue-500 disabled:opacity-50 disabled:cursor-not-allowed"}`,onClick:()=>n?i():v(),disabled:!n&&!e.trim()&&d.length===0,children:n?"中断":"发送"})]}),N.jsxs("div",{className:"flex border-b border-gray-200 mt-4 gap-2 justify-between",children:[N.jsx(Qw,{usage_metadata:(l==null?void 0:l.tokenCounter)||{}}),N.jsxs("span",{className:"text-sm text-gray-500",children:["会话 ID: ",c]})]})]})},e0e=()=>{const[e,t]=te.useState(!1),{showHistory:n,toggleHistoryVisible:r,showGraph:i,toggleGraphVisible:a,renderMessages:o,setTools:l,client:c}=Ts(),{extraParams:f,setExtraParams:d}=F5(),{showArtifact:h,setShowArtifact:m}=zp();return te.useEffect(()=>{l([Xye,Wye])},[]),N.jsxs("div",{className:"langgraph-chat-container flex h-full w-full overflow-hidden",children:[n&&N.jsx(BX,{onClose:()=>r(),formatTime:QF}),N.jsxs("div",{className:"flex-1 flex flex-col overflow-auto",children:[N.jsxs("div",{className:"flex items-center gap-2 p-4 border-b border-gray-200 justify-end h-16",children:[N.jsxs("button",{className:"px-3 py-1.5 text-sm font-medium text-gray-700 bg-white border border-gray-200 rounded-lg hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 flex items-center gap-1.5",onClick:()=>{r(),mO({showHistory:!n})},children:[N.jsx(CX,{className:"w-4 h-4"}),"历史记录"]}),N.jsx("div",{className:"flex-1"}),N.jsxs("button",{onClick:()=>t(!0),className:"px-3 py-1.5 text-sm font-medium text-gray-700 bg-white border border-gray-200 rounded-lg hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 flex items-center gap-1.5",children:[N.jsx(wX,{className:"w-4 h-4"}),"编辑参数"]}),N.jsx("button",{className:"px-3 py-1.5 text-sm font-medium text-gray-700 bg-white border border-gray-200 rounded-lg hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 flex items-center gap-1.5",onClick:()=>{console.log(o)},children:"打印日志数据"}),N.jsx("button",{className:"px-3 py-1.5 text-sm font-medium text-gray-700 bg-white border border-gray-200 rounded-lg hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 flex items-center gap-1.5",onClick:()=>{console.log(c==null?void 0:c.graphState)},children:"打印 State"}),N.jsxs("button",{className:"px-3 py-1.5 text-sm font-medium text-gray-700 bg-white border border-gray-200 rounded-lg hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 flex items-center gap-1.5",onClick:()=>{a(),mO({showGraph:!i})},children:[N.jsx(jX,{className:"w-4 h-4"}),"节点图"]}),N.jsxs("button",{className:"px-3 py-1.5 text-sm font-medium text-gray-700 bg-white border border-gray-200 rounded-lg hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 flex items-center gap-1.5",onClick:()=>{localStorage.setItem("code",""),location.reload()},children:[N.jsx(NX,{className:"w-4 h-4"}),"退出登陆"]})]}),N.jsx(Qye,{}),N.jsx(Jye,{}),N.jsx(YX,{isOpen:e,initialJson:f,onClose:()=>t(!1),onSave:d})]}),(i||h)&&N.jsxs("div",{className:"overflow-hidden flex-1",children:[i&&N.jsx(jie,{}),h&&N.jsx(Zie,{})]})]})},t0e=()=>N.jsx(rK,{children:N.jsx(UX,{children:N.jsx(Gie,{children:N.jsx(e0e,{})})})}),n0e=()=>{const[e,t]=te.useState([{key:"authorization",value:""}]),[n,r]=te.useState(localStorage.getItem("withCredentials")==="true"),[i,a]=te.useState(localStorage.getItem("apiUrl")||""),o=()=>{t([...e,{key:"",value:""}])},l=d=>{t(e.filter((h,m)=>m!==d))},c=(d,h,m)=>{const g=[...e];g[d][h]=m,t(g)},f=()=>{const d=Object.fromEntries(e.map(h=>[h.key,h.value]));localStorage.setItem("code",JSON.stringify(d)),localStorage.setItem("withCredentials",JSON.stringify(n)),localStorage.setItem("apiUrl",i),location.reload()};return N.jsx("div",{className:"min-h-screen bg-gradient-to-br from-gray-50 to-gray-100 flex items-center justify-center p-4",children:N.jsx("div",{className:"w-full max-w-4xl bg-white rounded-2xl shadow-xl overflow-hidden",children:N.jsxs("div",{className:"grid md:grid-cols-2",children:[N.jsx("div",{className:"hidden md:block bg-gradient-to-br from-blue-600 to-blue-800 p-12 text-white",children:N.jsxs("div",{className:"h-full flex flex-col justify-between",children:[N.jsxs("div",{children:[N.jsx("h1",{className:"text-4xl font-bold mb-6",children:"LangGraph UI"}),N.jsx("p",{className:"text-blue-100 text-lg leading-relaxed",children:"专业的 LangGraph 可视化界面,让您的 AI 应用开发更加高效和直观。"})]}),N.jsxs("div",{className:"space-y-4",children:[N.jsxs("div",{className:"flex items-center space-x-3",children:[N.jsx("div",{className:"w-8 h-8 rounded-full bg-blue-500 flex items-center justify-center",children:N.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:N.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M5 13l4 4L19 7"})})}),N.jsx("span",{children:"直观的可视化界面"})]}),N.jsxs("div",{className:"flex items-center space-x-3",children:[N.jsx("div",{className:"w-8 h-8 rounded-full bg-blue-500 flex items-center justify-center",children:N.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:N.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M13 10V3L4 14h7v7l9-11h-7z"})})}),N.jsx("span",{children:"高效的开发体验"})]}),N.jsxs("div",{className:"flex items-center space-x-3",children:[N.jsx("div",{className:"w-8 h-8 rounded-full bg-blue-500 flex items-center justify-center",children:N.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:N.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z"})})}),N.jsx("span",{children:"安全可靠的配置"})]})]})]})}),N.jsxs("div",{className:"p-8 md:p-12",children:[N.jsxs("div",{className:"md:hidden mb-8",children:[N.jsx("h1",{className:"text-3xl font-bold text-gray-900",children:"LangGraph UI"}),N.jsx("p",{className:"text-gray-600 mt-2",children:"专业的 LangGraph 可视化界面"})]}),N.jsxs("form",{onSubmit:d=>{d.preventDefault(),f()},className:"space-y-6",children:[N.jsxs("div",{children:[N.jsx("label",{htmlFor:"api-url",className:"block text-sm font-medium text-gray-700 mb-2",children:"API URL"}),N.jsx("input",{type:"text",id:"api-url",value:i,onChange:d=>a(d.target.value),placeholder:"例如: http://localhost:8123",className:"w-full px-4 py-3 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent transition-all"})]}),N.jsxs("div",{children:[N.jsx("label",{className:"block text-sm font-medium text-gray-700",children:"请求头配置"}),e.map((d,h)=>N.jsxs("div",{className:"bg-gray-50 rounded-lg p-4",children:[N.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[N.jsx("div",{children:N.jsx("input",{type:"text",id:`header-key-${h}`,value:d.key,onChange:m=>c(h,"key",m.target.value),placeholder:"例如: authorization",required:!0,className:"w-full px-4 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent transition-all"})}),N.jsx("div",{children:N.jsx("input",{type:"text",id:`header-value-${h}`,value:d.value,onChange:m=>c(h,"value",m.target.value),placeholder:"例如: Bearer token;无则填 1",required:!0,className:"w-full px-4 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent transition-all"})})]}),h>0&&N.jsxs("button",{type:"button",onClick:()=>l(h),className:"text-red-600 hover:text-red-700 text-sm font-medium flex items-center space-x-1 transition-colors",children:[N.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:N.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"})}),N.jsx("span",{children:"删除此请求头"})]})]},h))]}),N.jsxs("div",{className:"flex items-center space-x-3",children:[N.jsx("input",{type:"checkbox",id:"with-credentials",checked:n,onChange:d=>r(d.target.checked),className:"w-4 h-4 text-blue-600 border-gray-300 rounded focus:ring-blue-500"}),N.jsx("label",{htmlFor:"with-credentials",className:"text-sm text-gray-700",children:"启用 withCredentials(跨域请求时发送 Cookie)"})]}),N.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 pt-4",children:[N.jsxs("button",{type:"button",onClick:o,className:"flex-1 px-6 py-3 bg-gray-100 text-gray-700 rounded-lg hover:bg-gray-200 transition-colors font-medium flex items-center justify-center space-x-2",children:[N.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:N.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M12 6v6m0 0v6m0-6h6m-6 0H6"})}),N.jsx("span",{children:"添加请求头"})]}),N.jsxs("button",{type:"submit",className:"flex-1 px-6 py-3 bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition-colors font-medium flex items-center justify-center space-x-2",children:[N.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:N.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M5 13l4 4L19 7"})}),N.jsx("span",{children:"保存配置"})]})]})]})]})]})})})};function r0e(){const[e,t]=te.useState(localStorage.getItem("code"));return N.jsx(N.Fragment,{children:e?N.jsx(t0e,{}):N.jsx(n0e,{})})}gq.createRoot(document.getElementById("root")).render(N.jsx(r0e,{}))});export default i0e();
|